Hello, I am the author who port cocos2dx to linux.
besides, I may write an English tutorial about how to compile it in eclipse with ubuntu. if you have any suggestion or require some help, please feel free to contact with me by laschweinski@gmail.com.
Thanks for your attention to my work…
cat this port works on 32 and 64 bit distributions?
I can’t compile with my Archlinux 64 bits. I have fmod and glfw dependencies installed.
But from eclipse when compiler show some errors on CCTMXLayer.cpp:
rect = CCRect::CCRectMake(rect.origin.x / m_fContentScaleFactor, rect.origin.y / m_fContentScaleFactor, rect.size.width/ m_fContentScaleFactor, rect.size.height/ m_fContentScaleFactor);
can’t call directly to cocos2d::CCRect::CCRect constructor, I fix this error removing CCRect::
but have other error:
int index = ((int)item - (int)m_pAtlasIndexArray->arr) / sizeof(void**);
conversion from int** to int losses precision, and conversion from void** to int losses precision
You should add the “~~m32" compile flag to the compiler and linker
The first error can be “fixed” by adding "~~fpermissive” to the GCC C++ Compiler Misc Flags.
Edit:
For this to work you’ll also need 32Bit versions of all dependency libraries.
sorry I test the version only on ubuntu 11.04 and 10.04 32 bit.
I may try to run it in 64 bit. But I don’t have a 64 bits os, I need to install it first.
Besides, do you like the way to compile android and linux targets in the same project, as what I introduce in my last blog http://blog.csdn.net/laschweinski/article/details/6745008
or using cmake to compile all of things is better than eclipse. As a eclipse lover, I think eclipse is more convenient, while the way cmake or makefile conform with the traditional linux way.