Topic: [SOLVED] Symbols not found for architecture

So I'm a bit new to development using xcode with libnfc, and my end goal is to compile using xcode, a working example  from the documentation example. So far I've used mac ports to install all the correct dependencies, and run the 'nfc-list' command from terminal with success (connected with a touchatag RFID reader).

When I run lipo -info /usr/local/lib/libusb-1.0.0.dylib , I get the following returned:
Non-fat file: /usr/local/lib/libusb-1.0.0.dylib is architecture: x86_64

which I guess is correct according to the installation guide (x86_64, and I'm on a 64-bit mac machine).

Early coding in xcode using the example, I run into errors when putting in the following line:
const char *acLibnfcVersion = nfc_version();

then when building, I get an 'Apple Mach-O Linker (id) Error'
Undefined symbols for architecture x86_64:
  "_nfc_version", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64

I tried to change the Architectures to 32-bit in the build settings, but I get the same thing with i386 instead.
I'm not sure what to do, the command "lipo -info" does tell me its set to x86_64.

Any ideas?

Re: [SOLVED] Symbols not found for architecture

I've found out what I had not done!

I had not added the libnfc.dylib library link. In case anyone else new comes across this problem, just do the following:

1) Select the project in the project navigation window which will show project summary on right
2) Select the tab labeled "build phases"
3) Open Link Binary With Libraries
4) Select the + to add Library
5) Find and select libnfc.dylib
6) Build it again and errors are gone.

Hopefully I won't bump into any more errors like this one.