简体   繁体   English

从C ++代码创建静态库并与iPhone SDK链接

[英]Creating static library from C++ code and linking with iPhone SDK

I have written some code in C++ with a corresponding C interface (ie C-function wrappers around the classes) that a friend wants to use in an iPhone application. 我已经用C ++用相应的C接口(即类周围的C函数包装器)编写了一些代码,朋友希望在iPhone应用程序中使用。

Since I heard you can compile C++ for the plattform, but not use the iPhone sdk at the same time (sic) I thought that compiling all the code into a static library that my friend then can link together with his project in xcode. 由于我听说您可以为平台编译C ++,但不能同时使用iPhone sdk(原文如此),所以我认为将所有代码编译到一个静态库中,然后我的朋友可以将其与xcode中的项目链接在一起。

So the question is, 所以问题是

What is, if possible the command line for compiling all my cpp files into a static library for the iPhone os? 什么是命令行(如果可能),将我所有的cpp文件编译到iPhone操作系统的静态库中的命令行是什么?

Thanks! 谢谢!

Xcode可以在一个iPhone项目中愉快地编译C ++代码以及C和Objective-C。

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

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