Results 1 to 2 of 2

Thread: How to configure/build 64-bit applications on Mac?

  1. #1
    Join Date
    Oct 2009
    Location
    Maryland
    Posts
    16
    Thanks
    3
    Thanked 3 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default How to configure/build 64-bit applications on Mac?

    I don't seem to be able to build a 64bit application on the Mac platform. I have the LGPL qt-sdk-mac-opensource-2010.01.dmg binary package. My qmake *.pro file is as follows:

    QT += network opengl
    TARGET = SixtyFour
    TEMPLATE = app
    CONFIG += x86_64

    SOURCES += main.cpp\
    MainWindow.cpp

    HEADERS += MainWindow.h

    FORMS += MainWindow.ui
    alas, this generates the message:

    /Library/Frameworks/QtCore.framework/Headers/qglobal.h:288:2: error: #error "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration."
    On Linux and Windows there is a "configure" script/program that allows configuring Qt. However I haven't found where this ends up on theMac. Is there a way to get/configure a 64bit version of Qt for the Mac? Looking at qt.nokia.com/downloads I didn't see any 64bit Mac SDK for download.

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: How to configure/build 64-bit applications on Mac?

    Hi iraytrace, I had the same problem. The default Mac Qt libraries use the older Carbon libraries for compatibility with Intel 32-bit and PPC Mac systems. The newer Cocoa libraries provide support for only Intel 32/64-bit and from what I read, Qt Carbon libraries will eventually disappear and only the Cocoa builds will be available.

    Go to the URL below and download the Cocoa build, uninstall the current Qt, and then install the new Cocoa version:

    http://qt.nokia.com/downloads/mac-os-cpp

    For your app, if you include the following in the PRO file, you'll get a universal binary that will run on 32-bit or 64-bit mac platforms:

    CONFIG += x86 x86_64

    Hope that helps,

    jthomps

  3. The following 2 users say thank you to jefftee for this useful post:

    desertpilot (20th July 2010), iraytrace (1st February 2010)

Similar Threads

  1. Replies: 1
    Last Post: 13th January 2010, 23:35
  2. Static build of Qt-embedded applications
    By cloud in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 8th January 2010, 11:29
  3. Replies: 3
    Last Post: 5th May 2009, 15:46
  4. Can i use visual studio 2005 to build Qt applications?
    By coder1985 in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2007, 17:23
  5. Configure QT vs build plugins manually!!!
    By nnidza in forum Newbie
    Replies: 9
    Last Post: 16th January 2007, 21:37

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.