pkulchenko / wxlua

wxlua: Lua bindings for wxWidgets cross-platform GUI toolkit; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and wxWidgets 3.x
304 stars 59 forks source link

failed to build on windows11 with llvm-mingw-20220906-msvcrt-x86_64 #112

Closed zhaohansprt closed 1 year ago

zhaohansprt commented 1 year ago

Hi Paul i love lua and i want to use it to explorer wx applications please help me check this build failed issue.

"llvm-rc: Error in 24 statement (ID 1): error : file not found : wx/msw/wx mingw32-make[2]: *** [modules\luamodule\CMakeFiles\wxLuaModule.dir\build.make:89: modules/luamodule/CMakeFiles/wxLuaModule.dir/luamodule.rc.obj] Error 1"

platform: Windows11 compiler: llvm-mingw-20220906-msvcrt-x86_64 lua: 5.4.4 wxWidgets: 3.2.1

pkulchenko commented 1 year ago

@zhaohansprt, what's the cmake build command? I'm building on Windows with something like the following and haven't seen any build issues:

  cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" -DCMAKE_BUILD_TYPE=$WXLUABUILD -DBUILD_SHARED_LIBS=FALSE \
    -DCMAKE_CXX_FLAGS="-DLUA_COMPAT_MODULE" \
    -DwxWidgets_CONFIG_EXECUTABLE="$INSTALL_DIR/bin/wx-config" \
    -DwxWidgets_COMPONENTS="xrc;xml;stc;gl;html;aui;adv;core;net;base" \
    -DwxLuaBind_COMPONENTS="xrc;xml;stc;gl;html;aui;adv;core;net;base" \
    -DwxLua_LUA_LIBRARY_USE_BUILTIN=FALSE \
    -DwxLua_LUA_INCLUDE_DIR="$INSTALL_DIR/include" -DwxLua_LUA_LIBRARY="$INSTALL_DIR/lib/lua$LUAV.dll" .
pkulchenko commented 1 year ago

error : file not found : wx/msw/wx

Based on the error message it looks like the wxwidgets folders may not be set up correctly. Please check that the location of wxwidgets is configured in wxlua and is correct.

pkulchenko commented 1 year ago

I'd need additional information to do any further check on this. Feel free to reopen when you have additional details.