0

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

4

2 回答 2

0

您不能将自定义(编译)库添加到 iPhone 应用程序。您应该始终在项目中包含源代码。

于 2009-09-08T08:25:48.987 回答
0

您需要将库的头文件添加到项目中,或者如果缺少框架,请将其添加到 Xcode 中的“框架”文件夹中。

于 2009-09-08T08:27:21.320 回答