views:

46

answers:

1

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

+1  A: 

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
Nikolaus Gradwohl
It still seems to make universal binaries, as the linker error still is the same. I've updated my question to show you the config as I have it now. To be sure I also added CONFIG -= ppc in the hopes this will remove it from doing universal builds. Any thoughts?
Toad
you could try to use a qt-version that has been compiled only for x86 - but I'm not sure if that helps
Nikolaus Gradwohl