Question

When I use qtcreator on mac, it creates universal binaries.

Does anyone know how to set it so it just creates a 'native' binary? (So i386' in my case?)

Qtcreator uses qmake as a buildsystem.

Google hasn't been my friend so far, I hope stackoverflow will.

EDIT: my config file so far:

TARGET = mongowriter
CONFIG   += console
CONFIG   -= app_bundle
CONFIG += x86
#CONFIG -= ppc 

TEMPLATE = app

INCLUDEPATH += /opt/local/include/.
INCLUDEPATH += ../mongodb/.

SOURCES += main.cpp

LIBS += /usr/local/lib/libmongoclient.a
LIBS += /opt/local/lib/libboost_thread-mt.a
LIBS += /opt/local/lib/libboost_filesystem.a
LIBS += /opt/local/lib/libboost_program_options.a

It still gives the error on the libmongoclient.a
The libboost libraries are all ok, but this is because I got them from macports with the +universal option.

Since mongoclient doesn't support universal I'm currently removing all the universal stuff. I was hoping to get 3 errors for the boost libs and that at l;east mongoclient would link. At that point I could redo the whole macport story again but this time with universal removed.

Unfortunately it seems it still builds a universal binary since I still have the same linker errors.

thanks for the help

Was it helpful?

Solution

you can use the 'CONFIG' variable in your project file to specify which plattforms shall be supported to create a universial binary you use

 CONFIG += x86 ppc

if you only need x86 you use

 CONFIG += x86
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top