简体   繁体   中英

Is it possible to include framework in C++ project in Xcode?

I have a C++ project generated from Cmake to Xcode. My project is just some static and dynamic libraries. I want to include some 3rd party frameworks to it. Is it possible? Is there any chance to include? Or I should completely redesign the project to Cocoa app? I haven't access to the framework source code. Work with Xcode 9.2.

No, you can't use Cocoa frameworks in pure C++ project.

But you can just create an obj-c project and include all of your existing sources inside - everything will work. Just remember to use .mm extension for the source files, calling C++ code.

You can use swift as well, but that will require to create a wrapper for C++ code.

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