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

项目中有C++文件,编译不过怎么处理 #5

Closed
Sunny-guangge opened this issue Mar 14, 2019 · 11 comments
Closed

项目中有C++文件,编译不过怎么处理 #5

Sunny-guangge opened this issue Mar 14, 2019 · 11 comments

Comments

@Sunny-guangge
Copy link

No description provided.

@zhutc
Copy link

zhutc commented Mar 14, 2019

你可以把mango抽成一个独立的子工程,设置该子工程的Compile Sources As 为 objective-C。将该子工程或者将其打包成静态库引入你的项目中。或者使用作者生成好的lex&&yacc等文件。

@Sunny-guangge
Copy link
Author

好的 我试一下 你也在项目中用这个库了吗 用着怎么样 可以加个微信 聊一下吗

@zhutc
Copy link

zhutc commented Mar 14, 2019

目前的版本功能有点小问题,简单修复下就能用。修复不是很长的方法,还是挺实用的

@Sunny-guangge
Copy link
Author

有什么小问题

@zhutc
Copy link

zhutc commented Mar 14, 2019

@Sunny-guangge #6

@YPLiang19
Copy link
Owner

@Sunny-guangge @zhutc 近来太忙没怎么维护,现在已经支持pod接入方式,可以直接使用不需要额外配置,应该不会报错。 本来想在podspec文件中配置pod_target_xcconfig解决这个问题,将这个Target的Compile Sources As设置为objective-C,但是找了半天没找到Compile Sources As对应的内部Key,所以就直接手动将lex和yacc文件生成的c文件,再改为m文件用,如果你们知道Compile Sources As对应的内部Key还希望告知下~~

@zhutc
Copy link

zhutc commented Mar 14, 2019

@YPLiang19
GCC_INPUT_FILETYPE = sourcecode.c.objc

可以通过打开xxxx.xcodeproj/project.pbxproj文件,然后在xcodeUI界面中手动修改这个配置项,然后观察project.pbxproj文件的变动来找到对应的key

oc

@YPLiang19
Copy link
Owner

@zhutc 谢谢!

@YPLiang19
Copy link
Owner

@Sunny-guangge MangoFix这个target选用Objective-C
image

@Sunny-guangge
Copy link
Author

@YPLiang19 这个选的就是Objective-C

@YPLiang19
Copy link
Owner

@Sunny-guangge 试试1.0.2,我这边项目也有c++,但是使用没问题。

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

No branches or pull requests

3 participants