not the architecture being linked
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?
Re: not the architecture being linked
Remove the Makefile file, clean the project completely (remove all generated files and object files), then rerun qmake and build the program.
Re: not the architecture being linked
Now I have tested it, but with the same result.
Re: not the architecture being linked
Then you obviously have something platform specific in either your code or your .pro file.
Post your .pro file please.
Re: not the architecture being linked
QT += network sql
TEMPLATE = app
CONFIG += x86
SOURCES=...
HEADERS=...
FORM=...
LIBS += -L"./map" -L"/opt/local/lib"
INCLUDEPATH += "./map" "/opt/local/include"
LIBS += -lmongoclient
Re: not the architecture being linked
libmongoclient.a, is that a library you made?
Is it runable on your mac?
Re: not the architecture being linked
it comes from a open source db, mongodb, which should run on mac
Re: not the architecture being linked
Did you compile it yourself? On the mac?
Or did you copy if from somewhere else?
Re: not the architecture being linked
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.