开发者

Calling C++ cocoa touch static library from iphone app

I have de开发者_如何学JAVAveloped a very simple C++ based cocoa touch static library and a simple touch based application which includes this library.

The application gives compilation error "Undefined symbol" corresponding to the librarie's function being called. ld: symbol(s) not found.

But if I make C based cocoa touch static library, (with same functionality), the application is successfully built and runs fine.

What can be the issue? Is C++ based cocoa touch library NOT ALLOWED ?

Thanks


The library has .cpp and .h source code, and test application had .m files. It was giving compilation error. To fix this , I just changed file extension of .m files to .mm in my test application. And it compiled, linked and ran successfully. Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜