Comments (6)
Did you mean that, less function should be put into namespace cocos2d?
cocos2d-x don't support Mac OS X, so you port it to Mac OS X?
from cocos2d-x.
Do you mind posting issues in official forum later?
The link is http://www.cocos2d-x.org/projects/cocos2d-x/boards.
Thank you.
from cocos2d-x.
Did you mean that, less function should be put into namespace cocos2d?
No fear, it's one-time function (as far as I understood), it should not pollute API namespace, it should be only accessible in that compilation unit.
I placed it into anonymous namespace, because it's (according to Stroustrup) preferred way to restrict function visibility:
“The use of the static keyword is deprecated when declaring objects in a namespace scope, the unnamed-namespace provides a superior alternative.”
cocos2d-x don't support Mac OS X, so you port it to Mac OS X?
No, I just building under Mac OS X targeting iOS 4.3. I've got a compilation error on XCode, but everything is OK on MSVS 2010 under Windows. There are actually some differences in #include'ing headers of “stable” libraries (Cocos2d-x, Loki, Boost, STL) in precompiled header in Visual C++ and prefix header in XCode.
from cocos2d-x.
Probable steps to reproduce (have not checked yet):
- Create XCode project with Cocos2d-x template. Source code of Cocos2d-x will be included in xcodeproj directly. Therefore prefix header will be implicitly added to every compilation unit.
- Edit Prefix.pch:
#ifdef __OBJC__ #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #elif defined __cplusplus #include <functional> #endif
- Try to build.
from cocos2d-x.
@Qbit86 : That PCH file is incorrect. Both __OBJC__ and __cplusplus are both defined when a .cpp or .mm file is compiled. In other words, the conditions should be nested, instead of being disjunct.
from cocos2d-x.
@qbit86 Please, could you open a bug in redmine in future? We are in process of migrating all the issues to redmine and github issue won't be available after August
from cocos2d-x.
Related Issues (20)
- 想问下最新版v4.0的引擎把js 模块去掉了,那现在还能在4.0上使用cocos2d-js么? HOT 2
- Crash in cocos2dx game 3.17.2 HOT 2
- fix the bug that ect1 texture lost on android
- undefined reference to libchipmunk.a HOT 3
- AttributeError: 'URLError' object has no attribute 'code' HOT 1
- FlipY3D issue if setDesignResolution and RenderTexture is used HOT 1
- Want Cocos2d-x v4 Mac to use openGL rendering,what can i do HOT 2
- Is project dead? HOT 5
- Where is CCGLProgram.cpp ? HOT 1
- A iOS crash occurs when we replace the network module with cocos-engine/native/cocos/network.
- [Feature Request] Build external libs from source HOT 1
- Compiling with Ninja Generator and CLION
- Null Image Data In RenderTexture::newImage Callback
- 错误:找不到 <js> 模板。 HOT 1
- cocos run -p mac出错,只能web,编译也是,平台只能web,其他都会报错
- 4.0是不是不支持js了??? HOT 1
- libMiniCL.a link error when building for iOS Simulator
- Failed to build from source on Ubuntu 22.04 HOT 3
- cocos2d游戏项目在IOS上真机调试
- cocos2dx-lua 还有计划支持国产系统吗? HOT 1
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 cocos2d-x.