views:

102

answers:

2

Hi,

I fairly new on iPhone development and I'm currently trying to add some static libraries to my project but I get the "Symbol(s) not found" error.

I've googled the issue and tried different solutions without any luck. The libraries are compiled on a PC and not on a Mac so my questions are:

Do I need to compile the code on a Mac? What tool(s) do I need to be able to compile them?

I have included the headers to the project. The code I'm trying to link to are written in c and are compiled for ARM GCC 4.2.

I get the following errorcode:

ld warning: in /Users/<>/Playground/Collage/libbaseapi.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/capseng.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/excodecs.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmautorama.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmclearshot.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmexif.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmextencoder.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmfacewarp.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmfxplugin.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmimageenhance.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmimagefusion.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmjpegsqueeze.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmjpegtools.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmphotoart.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmredaway.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmsemc.a, file is not of required architecture ld warning: in /Users/<>/Playground/Collage/fmspeedview.a, file is not of required architecture

Undefined symbols: "_caps_destroyBuffer", referenced from: -[CollageMainView drawRect:] in CollageMainView.o ld: symbol(s) not found collect2: ld returned 1 exit status "_caps_destroyBuffer", referenced from: -[CollageMainView drawRect:] in CollageMainView.o ld: symbol(s) not found collect2: ld returned 1 exit status Build failed (1 error)

BR, Andreas

A: 

You can't add custom (compiled) libraries to an iPhone application. You should always include the source code in your project.

Philippe Leybaert
can't or aren't allowed?
drisse
Well, it IS technically possible, but according to the iPhone developer documentation, it is not allowed.
Philippe Leybaert
Our intensions are not to publish our application on App Store, we're only doing a prof of concept app. If it is technically possible as you say, do you know if the libraries shall be compiled on a Mac or if it should work with libraries compiled on a PC? Thank you very much for your help.
drisse
A: 

You need to either add the header files for your libraries to your project, or if it's a missing framework, add it to the "frameworks" folder in Xcode.

Brock Woolf
the libraries are of type *.a are written in c-code and I've included the headers to the project by drag and dropping them into the project.
drisse