设为首页 加入收藏

TOP

Objective-C调用C++文件
2014-11-24 07:40:29 来源: 作者: 【 】 浏览:1
Tags:Objective-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)


折腾半天的问题到此终于解决。



】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇iOS开发之获取本机IP地址的方法 下一篇Android复制Assets目录下的文件到..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Libevent C++ 高并发 (2025-12-26 00:49:30)
·C++ dll 设计接口时 (2025-12-26 00:49:28)
·透彻理解 C 语言指针 (2025-12-26 00:22:52)
·C语言指针详解 (经典 (2025-12-26 00:22:49)
·C 指针 | 菜鸟教程 (2025-12-26 00:22:46)