ubuntu 14.04 环境搭建之一请看http://blog.youkuaiyun.com/zzqnsg/article/details/40783615
二.通过eclipse编译linux cocos2dx 3.3
1.cd cocos2d-x2.可以用上边的那个MyGame工程,也可以重新生成一个,这里就同一个MyGame工程
3.把/media/work2/sw/cocos2d-x-3.3rc0/tests/cpp-tests下的Classes,Resources,proj.linux复制到MyGame目录里,同时把CMakeLists.txt的set(GAME_SRC里)加上Classes里的全部cpp文件(参考tests/cpp-tests/CMakeLists.txt),然后加上:
# architecture
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 )
set(ARCH_DIR "64-bit")
else()
set(ARCH_DIR "32-bit")
endif()
#kk
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/Classes
)
4.在/media/work2/workspace_bundle/dorepent/krepent运行:
cmake .
这时就生成了Makefile文件
5.eclipse->new->project..->c/c++->Makefile Project with Existing Code->Linux GCC->/media/work2/workspace_bundle/dorepent/krepent
6.右击这个项目->build configurations->build all