1

Currently I am including an external library in my xcode project. I have included the libraries manually in my project, so I am able to get all the library function. There is no any compile time errors, but when I am running I am getting runtime error somewhat like mentioned bellow

Undefined symbols for architecture x86_64: "_zip_error_to_str", referenced from: Greeting::Greeting() in Myzipclass.o "_zip_open", referenced from: Greeting::Greeting() in Myzipclass.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've included libzip libraries in to my project.

More details: I haven't included any framework. Is it necessary to include framework? I am totally new in xcode. If it is necessary to include framework then can anyone tell me procedures to include? I mean, should it be inside the project?

sebenalern
  • 2,515
  • 3
  • 26
  • 36
  • Please provide more details about how you add libzip to you xcode project. – lulyon Jun 09 '16 at 07:04
  • i added lib directory from the archive given at this link http://www.nih.at/libzip/index.html .. manually added lib directory and included it.. i have added screen shots of them please check. – Abhinandan Dharmadikari Jun 09 '16 at 07:05

1 Answers1

0

Just concluded from the error info, See if static library libz.1.X.X.dylib have been added to xcode. Otherwise,

targets--->build phases----->link binary with libraries-----> add libz

lulyon
  • 6,707
  • 7
  • 32
  • 49
  • libz.1.1.3.tdb is alredy added lulyon still it is showing the same linker error – Abhinandan Dharmadikari Jun 09 '16 at 07:23
  • @AbhinandanDharmadikari Please check if the library placed in the wrong directory, cause the `Undefined symbols ` makes it very clear that the intended lib is not linked to your executable. – lulyon Jun 09 '16 at 17:48