When compiling a demo program for a library with xCode, I get an undefined symbols error. The same C code compiles without any problems with gcc test.c -pthread -ltraffic
. I did set the compiler flags I. xCode without any success.
What does xCode do differently than gcc? Don't they both use LLVM?
The problem is that all your external libraries (pthread, traffic, etc..) have to be compiled for both i386 and x86_64 architectures. This means that you have to have either two library files for each library or one "fat" library file (see here).