Closed Echo-o-Tree closed 1 year ago
I'm trying to build wxLua using Lua 5.4.4, wxWidgets 3.2.1 and the current release of wxLua 3.2.0.2 I'm using CMake 3.25.0 to generate a MSV17 (2022) sln file and the MSV17 IDE to build and compile wxLua I've added the lua 5.4.4 source files to wxLua\modules, but the 5.4.dll doesn't work for building wxLua I get these errors when trying to build:
3>A:\lua\bin\lua54.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x340 3>Done building project "wxLuaModule.vcxproj" -- FAILED. 10>A:\lua\bin\lua54.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x340 10>Done building project "wxLuaFreeze.vcxproj" -- FAILED. 9>A:\lua\bin\lua54.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x340 9>Done building project "wxLua_app.vcxproj" -- FAILED. 11>A:\lua\bin\lua54.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x340 11>Done building project "wxLuaCan.vcxproj" -- FAILED.
This looks like an issue with the generated file. Does lua54.dll look correct if you open it? What's the cmake
command you used to configure it?
lua54.dll is obfuscated I used the cmake GUI to configure the build, I'll try from the cmd line The only changes I made in the Gui were to add the wxWidgets paths, and change the lua path to the 5.4 lua54.dll works fine with the lua interpreter.
More than likely, I configured something wrong. I'll rebuild the Lua 5.4.4, wxWidgets and wxLua using the instructions for 5.1
Is there anything special I need to do besides copying the lua5.4 source to wxLua\modules and the lua54.dll to the wxLua\luaproxydll?
Is there anything special I need to do besides copying the lua5.4 source to wxLua\modules and the lua54.dll to the wxLua\luaproxydll?
You don't need to do these steps if the cmake configuration is done correctly. Here is what I use to build wxlua/wxwidgets on windows (using msys/gcc): https://github.com/pkulchenko/ZeroBraneStudio/blob/master/build/build-win32.sh#L309-L315. The last line of this command sets LUA_INCLUDE_DIR
and LUA_LIBRARY
values, which would point to Lua5.4 in your case.
Thank You!
This issue is/was 100% user error. I did not configure CMake GUI properly the first time.
Again, thank you.
@Echo-o-Tree, how are you building this and what error are you getting?