PDA

View Full Version : not the architecture being linked



skizzik
13th October 2010, 15:06
I'm trying to compile a program - written on a pc - on a mac, but it doesn't work. I Get the following warning:

ld: warning: in ./external/mongo/libmongoclient.a, file was built for unsupported file format which is not the architecture being linked (i386)

and then:

ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [sökväg_till_programmet] Error 1
make: Leaving directory `sökväg_till_programmet'
Exited with code 2.
Error while building project Programmet
When executing build step 'Make'

Anyone have an idea of what it can be and what to do?

tbscope
13th October 2010, 16:07
Remove the Makefile file, clean the project completely (remove all generated files and object files), then rerun qmake and build the program.

skizzik
13th October 2010, 16:24
Now I have tested it, but with the same result.

tbscope
13th October 2010, 16:25
Then you obviously have something platform specific in either your code or your .pro file.

Post your .pro file please.

skizzik
13th October 2010, 17:04
QT += network sql
TEMPLATE = app
CONFIG += x86
SOURCES=...
HEADERS=...
FORM=...
LIBS += -L"./map" -L"/opt/local/lib"
INCLUDEPATH += "./map" "/opt/local/include"
LIBS += -lmongoclient

tbscope
13th October 2010, 17:08
libmongoclient.a, is that a library you made?
Is it runable on your mac?

skizzik
13th October 2010, 17:10
it comes from a open source db, mongodb, which should run on mac

tbscope
13th October 2010, 17:49
Did you compile it yourself? On the mac?
Or did you copy if from somewhere else?

skizzik
14th October 2010, 10:46
I think I got mongodb to work, but still have problems with a few others: libboost_thread-mt.dylib
and some more files from macport. Macport were installed when I came to this computer. The files have x86_64 arch and I don't know how to get them to i386.