Xrysnow / LuaSTG-x

LuaSTG-x is a multi-platform game engine.
MIT License
86 stars 17 forks source link

Linux Build Problems #11

Open ShizuhaAki opened 2 years ago

ShizuhaAki commented 2 years ago

这个 Issue 用来存放 Linux 平台下构建时遇到的问题。

目前问题:

In file included from /home/lilywhite/LuaSTG-x/frameworks/cocos2d-x/external/glfw3/include/linux/glfw3native.h:101:
/home/lilywhite/LuaSTG-x/frameworks/cocos2d-x/external/gfx/backend/gfx-base/GFXDef-common.h:123:12: error: unnamed scoped enum is not allowed
  123 | enum class Status : uint32_t {
      |            ^~~~~~
/home/lilywhite/LuaSTG-x/frameworks/cocos2d-x/external/gfx/backend/gfx-base/GFXDef-common.h:123:6: warning: elaborated-type-specifier for a scoped enum must not use the ‘class’ keyword
  123 | enum class Status : uint32_t {
      | ~~~~ ^~~~~
      |      -----
/home/lilywhite/LuaSTG-x/frameworks/cocos2d-x/external/gfx/backend/gfx-base/GFXDef-common.h:123:12: error: expected identifier before ‘int’
  123 | enum class Status : uint32_t {
      |            ^~~~~~
/home/lilywhite/LuaSTG-x/frameworks/cocos2d-x/external/gfx/backend/gfx-base/GFXDef-common.h:123:19: error: expected unqualified-id before ‘:’ token
  123 | enum class Status : uint32_t {
      |                   ^
/home/lilywhite/LuaSTG-x/frameworks/cocos2d-x/external/gfx/base/TypeDef.h:40:37: error: ‘type’ in ‘struct std::underlying_type<int>’ does not name a type
   40 |     inline std::underlying_type<T>::type toNumber(const T v) { return static_cast<std::underlying_type<T>::type>(v); }
      |                                     ^~~~
/home/lilywhite/LuaSTG-x/frameworks/cocos2d-x/external/gfx/base/TypeDef.h:40:37: note: in definition of macro ‘CC_ENUM_CONVERSION_OPERATOR’
   40 |     inline std::underlying_type<T>::type toNumber(const T v) { return static_cast<std::underlying_type<T>::type>(v); }
      |                                     ^~~~
/home/lilywhite/LuaSTG-x/frameworks/cocos2d-x/cocos/platform/desktop/CCGLViewImpl-desktop.cpp: In member function ‘void* cocos2d::GLViewImpl::getLinuxWindow()’:
/home/lilywhite/LuaSTG-x/frameworks/cocos2d-x/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:820:28: error: invalid conversion from ‘Window’ {aka ‘long unsigned int’} to ‘void*’ [-fpermissive]
  820 |     return glfwGetX11Window(_mainWindow);
      |            ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      |                            |
      |                            Window {aka long unsigned int}
ShizuhaAki commented 2 years ago

undef 后 fix,但后一个问题仍然存在

/home/lilywhite/LuaSTG-x/frameworks/cocos2d-x/cocos/platform/desktop/CCGLViewImpl-desktop.cpp:820:28: error: invalid conversion from ‘Window’ {aka ‘long unsigned int’} to ‘void*’ [-fpermissive]
  820 |     return glfwGetX11Window(_mainWindow);
      |            ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
      |                            |
      |                            Window {aka long unsigned int}
ShizuhaAki commented 2 years ago

加强转后 fix

ShizuhaAki commented 2 years ago

Link 时出错:

/usr/bin/ld: ../frameworks/cocos2d-x/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so: .dynsym local symbol at index 2 (>= sh_info of 2)
/usr/bin/ld: ../frameworks/cocos2d-x/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so: .dynsym local symbol at index 3 (>= sh_info of 2)
/usr/bin/ld: ../frameworks/cocos2d-x/external/linux-specific/fmod/prebuilt/64-bit/libfmod.so: .dynsym local symbol at index 4 (>= sh_info of 2)