3

I'm trying to use libxar inside my xcode4 project and get the famous "undefined symbols for architecture" error, no matter what arch I choose for building, e.g.:

Undefined symbols for architecture x86_64:
"xar_open(char const*, int)", referenced from: 
_main in main.o

I did what I always did to include the dylib:

  • set "library search path" to the path where libxar.dylib is placed
  • set "header path" to the path where xar.h is placed (which contains xar_open)
  • added libxar.dylib to build phases - link binary with libraries

Did I miss something?

CRABOLO
  • 8,605
  • 39
  • 41
  • 68
hitme
  • 51
  • 2
  • Are you linking to a 64-bit version of libxar? You're building a 64-bit version of your app, which requires a 64-bit version of libxar. If you're not using ARC in your app, you could try building a 32-bit version of your app and see if that eliminates the link error. – Swift Dev Journal Dec 19 '12 at 20:00
  • thanks for your suggestion. i tried both, built app and library as 32 and 64 bit. compiling fine, only linking is the problem. – hitme Dec 20 '12 at 10:24

0 Answers0