Comments (8)
why?
from cocos2dx-better.
When I drag the cocos2dx-better.project to my app project, and set the correct include header include path,
I got obj-c related issues.
I guess it's related to this import issue. So I just commented the 2 import lines suggested by oOEdoOo.
And then still got link issues.
But the TestCpp works fine.
Any steps I missed?
Thanks a lot!
from cocos2dx-better.
change compile source as to objective-c++
from cocos2dx-better.
But this setting cause my pure c library compiled fail.
Is the setting too aggressive?
Is there any particular reason to set this instead of default setting?
the original Cocos2d-x test cpp app doesn't need this.
Sorry that I have many questions...
BTW, is it possible just dragging few files related to the component I need instead of the whole project?
Might get more compatible?
from cocos2dx-better.
add "-x c" flag to your c source file. in build phase source list, double click a source file
from cocos2dx-better.
or create a new target for your c library
from cocos2dx-better.
Sry for reply late.
JoHuang's problem has explained why. Exactly I encounter the same problem as him.
When I dragged the project into my project, Many c library compiled fail.
So I just drag the CCRichLabel related files into my project since CCRichLabel is what I need, and commented the 2 objective-c statement in .h file. Everything works.
I think move all the objective-c code into .mm file will make this library much easier to be integrated, since no need to modify the project setting or code compile type.
from cocos2dx-better.
some macro is not easy to be refactored out as a .mm file. creating new target for your c library is best solution.
from cocos2dx-better.
Related Issues (20)
- CCImage_richlabel_ios.mm line 610 CCImage & CCImage undeclared HOT 6
- 新bug
- iOS project Target Dependency HOT 1
- RichLabel不能读取Resource文件夹以外的图片
- 在android上label还是会有纹理丢失的问题。 HOT 4
- 这里有点泄漏
- 小问题
- Socket issue HOT 4
- label的问题 HOT 1
- CCRichLabel ,显示不出来 HOT 1
- label的图标问题 HOT 9
- get embedded image bound HOT 3
- crash after setLinkTarget HOT 2
- Crash HOT 6
- Crash HOT 2
- memory leaks on Android ! HOT 6
- Android平台文字颜色问题 HOT 4
- 好久没来了 HOT 5
- 安卓手机下,图文混排图片和文本的位置有重叠,换行后,图片位置乱了
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cocos2dx-better.