简体   繁体   English

链接到Objective-C项目中的.a c ++库

[英]Linking to a .a c++ Library in an Objective-C Project

I'm trying to add support for iZotope (audio effects) in an Objective-C application. 我正在尝试在Objective-C应用程序中添加对iZotope(音频效果)的支持。

During integration, I've ran into a number of problems related to linking the iZotope C++ library into my Xcode project. 在集成期间,我遇到了许多与将iZotope C ++库链接到我的Xcode项目有关的问题。

As of this point I haven't done nothing else than: 到目前为止,我除了:

  • Add the libraries (.a) in TARGETS > MyTargetName > Build Phases > Link Binaries with Libraries 在目标> MyTargetName>构建阶段>使用库链接二进制文件中添加库(.a)。
  • Add the header files of the library to PROJECT > MyProjectName > Build Settings > Search Paths > Header Search Paths 将库的头文件添加到PROJECT> MyProjectName>构建设置>搜索路径>头搜索路径

I haven't written any code, at all. 我根本没有编写任何代码。 My goal for now is to get my project to compile, as it was before adding the libraries. 我现在的目标是像添加库之前那样使我的项目编译。

Here is a link to the compiler output ( https://gist.github.com/dornad/6310107 ). 这是编译器输出的链接( https://gist.github.com/dornad/6310107 )。 To me it seems that Xcode has no idea about the c++ std library, so it fails spectacularly. 对我来说,Xcode似乎对c ++ std库一无所知,因此它以失败告终。

Any ideas? 有任何想法吗?

Standard C++ libraries can not be found. 找不到标准的C ++库。 Probably, the extension of your project files is .m instead of .mm , which is necessary for c++ compilation. 项目文件的扩展名可能是.m而不是.mm ,这对于c ++编译是必需的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM