Objective-C调用C++文件
“Receiver type for instance messages is a forward declaration”的错误。即使将"@class Hello;" 改为#import "Hello.h"也还是会在NewHello上报"Unkwon type class,did you mean Class" 的错误。
解决方法是:
The solution is to add
#import "Hello.h"
to your ViewController.m file and change the file type of ViewController.m to Obj-C++ (from the right panel)
折腾半天的问题到此终于解决。
相关推荐
fort0 2020-05-16
81570790 2020-04-16
86540698 2020-04-08
zhoutaifeng 2020-03-07
好好学习天天 2020-03-06
InterestSoul 2020-02-17
82467413 2019-12-31
84407518 2012-07-16
81570790 2013-07-01
83254851 2013-08-29
84334052 2019-11-19
86540698 2019-11-19
84467715 2011-07-25
81731290 2014-03-22
85437811 2014-03-22
dahuichen 2019-10-25
ObjectiveC 2011-09-20
80530297 2015-04-14
80530297 2015-04-20