简体   繁体   English

如何将ac / c ++库集成到目标c

[英]How to integrate a c/c++ library into objective c

A company has asked me to deliver them ac/c++ library. 一家公司要求我为他们提供ac / c ++库。 They want to use it in an iphone app, which is objective c based. 他们想在基于目标c的iphone应用中使用它。

I would prefer to deliver a library as opposed to code. 我希望提供一个库而不是代码。

Could they wrap the c/c++ library into their iphone app without any need to see the source code? 他们是否可以将c / c ++库包装到其iphone应用程序中而无需查看源代码?

Thanks 谢谢

From what i understand you want to deliver a binary file for them to use in the application. 据我了解,您想提供一个二进制文件供他们在应用程序中使用。 If that is true then Yes it is possible but there is a catch you need to compile the library using the x code compiler for C++, and make sure that anything you use in your library is compatible whit the compiler.(make sure the library is compatible with armv7 and armv7s architectures). 如果是这样,则可以,但是有一个需要注意的地方,那就是需要使用C ++的x代码编译器来编译库,并确保库中使用的任何东西都与编译器兼容(确保库为与armv7和armv7s架构兼容)。 And as for the wrapper, there is no need for wrappers , they can use directly the c++ syntax inside code in .mm files. 至于包装器,则不需要包装器,它们可以直接在.mm文件中的代码内部使用c ++语法。 but if it's a must then they can use a wrapper generator to build the wrapper. 但是如果必须的话,他们可以使用包装器生成器来构建包装器。

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

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