Reputation: 28882
I'm getting this error when trying to compile my project.
What could be causing this? Basically I'm trying to use the barcode generator library from here http://www.onbarcode.com/tutorial/iphone-barcode-generator-guide.html
ld: warning: directory not found for option '-LOnBarcode/Release-iphonesimulator/usr/local/include'
ld: warning: ignoring file /path/OnBarcode/3.2/Release-iphoneos/libOnBarcodeIPhone.a, missing required architecture i386 in file
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_OBLinear", referenced from:
objc-class-ref in MyViewBarcode.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
I added the path in my header and library path. Although I need to clarify, how should the path look like if I'm doing it relative? (i.e ./path/name)
This is how my directory structure look on the filesystem:
Project
|-> OnBarcode
Should it be "./OnBarcode"?
Also yes I have read similar posts but those are more framework related and not library related.
Thank you,
Tee
Upvotes: 1
Views: 2529
Reputation: 11
Make sure you are referencing the correct libOnBarcodeIPhone.a for the simulator. It is located in the Release-iphonesimulator folder, otherwise if you are bulding for the device then reference the Release-iphoneos
Upvotes: 1