2

I'm a newbie when compiling and adding 3rd party C++ libraries into XCode... So here's the problem. I have .cpp files wich depend on 3 libraries. OpenCV-Eigen-SuperLU. So far think that I managed to add correctly OpenCV-Eigen, but I got trouble adding SuperLU.

I'm really confused on where should I include source files paths??. Some tutorials say that I need to create a static lib... other that I need a framework... on the other hand there are XCode project template which just include src files into a folder inside XCode project's and then reference them from build setting properties. Anyway I really need some guidance here.

So here's my setup for most of the libs. I have a folder within the XCode project with all dependencies.

enter image description here

Then... on project build settings I setup header search paths-- and library search paths. To point that folder

enter image description here

Headers for SuperLU are found correctly... but I get Linker errors.

enter image description here enter image description here enter image description here

So as you can see, I have no idea what to do... I'm Sorry but as I told on beginning I'm a newbie adding libs into XCode... plus documentation of procedures it's not good at all. So if anybody could help me with some guidance or links where I can start understanding how the linking process works would be great.

I'm a little desperate at this point, os any kind of help would be really really great. Thanks a lot.

4

2 回答 2

0

问题是 SuperLU 和 Objective-C 都定义了 YES 和 NO。所以你会发生冲突。

于 2013-05-28T11:35:34.360 回答
0

最后,我被建议创建一个不同的目标,以使用 gcc 编译器将所有 SuperLU 编译为纯 c++ 项目。这使得 iOS 应用程序可以使用 lib 作为依赖项。

于 2013-06-14T03:20:40.280 回答