Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

问一个小白的问题,在.h文件中引入会包module不能编译是因为header设置问题吗 #38

Closed
wucanqi opened this issue Jun 16, 2017 · 4 comments
Labels

Comments

@wucanqi
Copy link

wucanqi commented Jun 16, 2017

如题,我把.m改成了.mm 可以在类文件里导入库头文件,但是再.h文件里导入都会报module不能变异是咋回事呀

@RingoD
Copy link
Collaborator

RingoD commented Jun 16, 2017

麻烦描述具体一些,并贴出报错。

@wucanqi
Copy link
Author

wucanqi commented Jun 16, 2017

default

像这样,我的一个model想通过orm映射 需要导入头文件,我把.m文件已经改成了.mm 但是再.h中导入会报这个错误:could not build module "WCDB",如果将头文件在.mm中导入,则没有问题,可以正常运行,创建database对象等。

@RingoD
Copy link
Collaborator

RingoD commented Jun 16, 2017

其他包含该头文件的代码,也需要改为.mm后缀。
在Xcode的错误那里,可以找到是编译哪个文件导致的这个错误,并将对应文件改掉就好了。

@wucanqi
Copy link
Author

wucanqi commented Jun 16, 2017

可以啦,感谢大神~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants