简体   繁体   English

错误“ _OBJC_CLASS _ $ _ ISTAlertView”,引用自:

[英]Error “_OBJC_CLASS_$_ISTAlertView”, referenced from:"

When I am compiling my code I am getting this kinda errors... _OBJC_CLASS_$_ISTAlertView", referenced from: 当我编译代码时,我得到了类似的错误... _OBJC_CLASS _ $ _ ISTAlertView“,引用自:

Any clue what could be the reason? 任何线索可能是什么原因?

That error shows up when the .m file containing ISTAlertView is not being compiled into the target. 当未将包含ISTAlertView的.m文件编译到目标中时,将显示该错误。 The file may be there or it may not be; 该文件可能存在或可能不存在; it's just not getting compiled. 它只是没有被编译。 If this is from a library, then you're not linking in the library, so the compiler doesn't know where to go to find the ISTAlertView class. 如果这来自库,则您没有链接到库,因此编译器不知道在哪里可以找到ISTAlertView类。

If the file is yours, find it and "Get Info" on it in Xcode. 如果文件是您的文件,请在Xcode中找到它并在其上“获取信息”。 Then go to the "Targets" tab and make sure the checkbox is checked next to the target the file is supposed to be in. If it's already checked, then clean your build and try again. 然后转到“目标”选项卡,并确保已选中文件应位于的目标旁边的复选框。如果已选中该文件,则请清理构建并重试。

If it's in a library, then make sure the library is part of the "Link binary with libraries" phase of your target compilation. 如果在库中,请确保该库是目标编译的“使用库链接二进制”阶段的一部分。

The code file ISTAlertView.h and possibly also ISTAlertView.m are not present in your project. 代码文件ISTAlertView.h和ISTAlertView.m不在您的项目中。 Right click on your classes folder and select "add Existing files". 右键单击您的班级文件夹,然后选择“添加现有文件”。 Navigate to your Classes folder and check if you can find them there. 导航到您的Classes文件夹,并检查是否可以在其中找到它们。 If not, go looking under the desk :) 如果没有,去桌子下面看:)

It's only .m file that is missing... You didn't provide details about your project, but it if this source in the static library be sure you link it with the project, where the calling source reside. 只是缺少一个.m文件...您没有提供有关项目的详细信息,但是如果静态库中的此源确保您将其与调用源所在的项目链接,则它没有。 Of and referenced from... which you omitted can tell you which source uses functions from ISTAlertView.m. 省略的...引用可以告诉您哪个源使用了ISTAlertView.m中的函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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