简体   繁体   中英

Use boost library in cocoa project

理论上可以在cocoa项目中使用boost库(例如boost thread)?

Yes, there is nothing stopping you from doing that:

  • you can mix Objective-C and C++ - the result is called Objective-C++
  • you can of course also link to C and C++ libraries

Yes. You can compile boost as a static library and link against it, or you can add the source code to your project and compile it with it.

Yeah, just make sure you use Objective-C++ and include to the boost directories you need. (Note: to change to objective-C++ change the file extension to .mm instead of .m, and keep the .h files the same)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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