在 Eclipse CDT (os x) 中编译 .mm 文件
我已将 xcode 项目导入 Eclipse CDT,其中包含 myfile.h 和 myfile.mm 对。然而,似乎 *.mm 文件在构建中被忽略,因为我在 *.mm 文件中实现的类收到“未定义符号”错误。
我如何告诉 Eclipse CDT 对于给定的 .h 文件它也应该编译 .mm 文件?
谢谢。
I have imported an xcode project into Eclipse CDT, which contains myfile.h and myfile.mm pairs. It seems, however, that *.mm files are ignored in the build, as I am getting "Undefined symbols" error for the classes implemented in the *.mm files.
How can I tell Eclipse CDT that for a given .h file it should compile .mm file too?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
啊,好问题。不幸的是,CDT 目前不支持 Objective-C 文件。对此已经进行了一些讨论,希望我们在未来几个月能看到更多的活动。现在,您必须创建自己的 Makefile 或使用 CMake 从 xcodeproj 文件进行构建。
Ah, great question. Unfortunately the CDT currently doesn't have support for Objective-C files. There has been some discussion about that and hopefully we'll see more activity in the coming months. For now you would have to create your own Makefiles or use CMake to build from the xcodeproj file.