干炸牛_bian

导航

 

相关版本:gcc/g++ 14.1.1 cmake 3.30.0

1、先参考install-deps-linux.sh下载对应依赖
2、
cocos2d-x-4.0/templates/lua-template-default/CMakeLists.txt
中66行

  62   │if(ANDROID)
  63   │     # change APP_NAME to the share library name for Android, it's value depend on AndroidManifest.xml
  64   │     set(APP_NAME cocos2dlua)
  65   │     list(APPEND GAME_SOURCE ${RUNTIME_SRC_ROOT}/proj.android/app/jni/hellolua/main.cpp)
  66   │ elseif(LINUX)
  67   │     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") //加入这一行
  68   │     list(APPEND GAME_SOURCE ${RUNTIME_SRC_ROOT}/proj.linux/main.cpp)
  69   │ elseif(WINDOWS)

3、cocos2d-x-4.0/cocos/renderer/backend/DeviceInfo.h

  27   │ #include <string>
  28   │ #include <cstdint> //加入这一行
  29   │ #include "Macros.h"

4、cocos2d-x-4.0/external/json/document.h

 316   │ 
 317   │     GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
 318   │ 
 319   │   //GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
           //上面这一行注释掉
 320   │

5、下载更新libchipmunk.a
cocos2d-x-4.0/external/chipmunk/prebuilt/linux/64-bit/libchipmunk.a 替换掉

wget https://github.com/cocos2d/cocos2d-x/files/4272227/libchipmunk7.0.1.zip
posted on 2024-07-18 21:07  干炸牛_bian  阅读(4)  评论(0编辑  收藏  举报