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

[3.0] Clang (3.8) Build fails on Ubuntu 15.04 #13526

Closed
DanielBelow opened this issue Aug 24, 2015 · 5 comments
Closed

[3.0] Clang (3.8) Build fails on Ubuntu 15.04 #13526

DanielBelow opened this issue Aug 24, 2015 · 5 comments
Milestone

Comments

@DanielBelow
Copy link

Using clang3.8 on Ubuntu 15.04 a clean build fails with the following error:

In file included from [...]/cocos2d-x/cocos/base/allocator/CCAllocatorGlobal.h:31:
[...]/cocos2d-x/cocos/base/allocator/CCAllocatorStrategyDefault.h:45:16: error: use of undeclared identifier 'malloc'
return malloc(size);
^
[...]/cocos2d-x/cocos/base/allocator/CCAllocatorStrategyDefault.h:51:13: error: use of undeclared identifier 'free'
free(address);
^
2 errors generated.

I did install all dependencies and updated submodules.

Including cstdlib in the CCAllocatorStrategyDefault.h file did fix the problem for me.

@zilongshanren
Copy link
Member

@Tehlyria
The minimal GCC version is 4.9, please give it a try.

@DanielBelow
Copy link
Author

@zilongshanren

gcc -v
-- gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)

I'm building with clang though.
clang -v
-- clang version 3.8.0 (trunk 242676)

@pandamicro pandamicro added this to the v3.9 milestone Aug 24, 2015
@zilongshanren
Copy link
Member

@Tehlyria
Clang is not tested on the Linux platform. So you should switch to GCC.

@man2
Copy link

man2 commented Aug 25, 2015

I too have problem with clang on linux. I think it should be supported, because the compile time is so much faster with clang compared to gcc

@pandamicro
Copy link
Contributor

Hi, @man2 Linux is not our focusing platform, so we can't spend too much time on it, we have a small group size and we must focus on what is important for most of our users. So I'm sorry we can't improve it recently, I'm closing it.

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

No branches or pull requests

4 participants