符号未找到,预期在Flat Namespace ObjC ++中 [英] Symbol Not Found, expected in Flat Namespace ObjC++

查看:172
本文介绍了符号未找到,预期在Flat Namespace ObjC ++中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能有一个简单的问题,但在编译期间没有信息性错误或警告,提醒我发生了什么问题。



有一个Objective-C ++应用程序,包括一个C + +主要和ObjC头文件。



它构建正常,但运行时,它会给出此错误消息:



Dyld错误消息:
未找到符号:_OBJC_CLASS _ $ _ AppController
引用自:/ Users / slate / Documents / osirixplugins / eqOsirix / build / Development / rcOsirix.app / Contents / MacOS / rcOsirix
预期在:flat namespace
在/Users/slate/Documents/osirixplugins/eqOsirix/build/Development/rcOsirix.app/Contents/ MacOS / rcOsirix

没有数量的Google搜寻产生解决方案,



AppController.h包含在目标(已选中)中, #import

ObjC ++常见问题给我头痛。



谢谢,



-S!

解决方案

很明显,AppController类丢失了。是在动态库的框架中定义的AppController类吗?如果是这样,当你运行应用程序,它知道在哪里找到的库/框架?



顺便说一下,这是一个链接器问题。头文件是不相关的。它是.m或.mm文件,你需要看看。


I've got probably what is a simple problem, but there's no informative errors or warnings during compile to alert me to what is going wrong.

I've got a Objective-C++ app that includes a C++ main and ObjC header files.

It builds fine, but when run, it gives this error message:

Dyld Error Message:
  Symbol not found: _OBJC_CLASS_$_AppController
  Referenced from: /Users/slate/Documents/osirixplugins/eqOsirix/build/Development/rcOsirix.app/Contents/MacOS/rcOsirix
  Expected in: flat namespace
 in /Users/slate/Documents/osirixplugins/eqOsirix/build/Development/rcOsirix.app/Contents/MacOS/rcOsirix

No amount of googling has resulted in a solution, and I'm sure I've just missed a compilation or build option somewhere.

"AppController.h" is included in the target (checked), and #import'd in the ObjC Class File.

Any help is greatly appreciated.

ObjC++ constantly gives me a headache.

Thanks,

-S!

解决方案

Clearly the AppController class is missing. Is the AppController class defined in a framework of dynamic library? If so, when you run the app, does it know where to find the libraries/frameworks?

This is a linker issue, by the way. The header files are irrelevant. It's the .m or .mm files you need to look at.

这篇关于符号未找到,预期在Flat Namespace ObjC ++中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆