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
307 stars 59 forks source link

version.h location #101

Closed sonoro1234 closed 3 years ago

sonoro1234 commented 3 years ago

Using wxWidgets 3.1.5 and last wxLua with mingw-64 for 32bits:

wxLua says WARNING : Unable to find 'C:/supercolliderrepos/buildLua2SC3/wxLuaBundled/build_wx/install/include/wx/version.h'

but the actual place is:

C:\supercolliderrepos\buildLua2SC3\wxLuaBundled\build_wx\install\include\wx-3.1\wx

the full log is:

-- *****************************************************************************
-- * BUILD TYPE:        Release
-- * BUILD_SHARED_LIBS: FALSE
-- *****************************************************************************
-- * System is 32-bit TRUE, is 64-bit FALSE
-- *****************************************************************************
-- * CMAKE_SOURCE_DIR = C:/supercolliderrepos/Lua2SC
-- * CMAKE_BINARY_DIR = C:/supercolliderrepos/buildLua2SC3
-- *****************************************************************************
-- * ---------------------------------------------------------------------------
-- * wxWidgets library settings :
-- *
-- * Note that ONLY an all shared (DLL) or all static build is supported.
-- *   I.E. If you choose shared you must link to shared wxWidgets libs.
-- *   Set -DBUILD_SHARED_LIBS=[TRUE, FALSE] to control shared/static lib.
-- *
-- * Finding wxWidgets for MSW and MSVC
-- * -DwxWidgets_ROOT_DIR=[path] : (e.g. /path/to/wxWidgets/)
-- *   Path to the root of the wxWidgets build, must at least set this.
-- * -DwxWidgets_LIB_DIR=[path] : (e.g. /path/to/wxWidgets/lib/vc_lib/)
-- *   Path to the wxWidgets lib dir also set this if libs can't be found.
-- * -DwxWidgets_CONFIGURATION=[configuration] :
-- *   Set wxWidgets configuration; e.g. msw, mswu, mswunivu...
-- *   Where 'u' = unicode and 'd' = debug.
-- *   MSVC GUI : You need only choose msw, mswu, mswuniv, mswunivu since
-- *              release or debug mode is chosen in the GUI.
-- * -DwxWidgets_COMPONENTS=[...stc;html;adv;core;base or mono] :
-- *   For non-monolithic builds choose the wxWidgets libs to link to.
-- *    xrc;xml;gl;net;media;propgrid;richtext;aui;stc;html;adv;core;base
-- *   For monolithic builds choose mono and the contribs libs.
-- *    stc;mono
-- *   The extra decorations, e.g. wxmsw28ud_adv.lib, will be searched for.
-- *   Libs that cannot be found will be printed below, please fix/remove
-- *   them to be able to build this project.
-- *   You will get compilation/linker errors if wxWidgets is not found.
-- *
-- * Finding wxWidgets for GCC and Unix type systems
-- * -DwxWidgets_CONFIG_EXECUTABLE=[path/to/wx-config] :
-- *   Specify path to wx-config script for GCC and Unix type builds
-- * ---------------------------------------------------------------------------
--
-- * WARNING : Unable to find 'C:/supercolliderrepos/buildLua2SC3/wxLuaBundled/build_wx/install/include/wx/version.h'
-- *           Please set wxWidgets_ROOT_DIR to point to the root wxWidgets build dir.
-- * Using these wxWidgets components: stc;gl;html;aui;adv;core;net;base
-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS stc gl html aui adv core net base)
-- *
CMake Warning at wxLuaBundled/wxlua/wxLua/build/CMakewxAppLib.cmake:325 (message):
  * WARNING: Could not find wxWidgets! Please see help above.
Call Stack (most recent call first):
  wxLuaBundled/wxlua/wxLua/CMakeLists.txt:58 (FIND_WXWIDGETS)

-- * - wxWidgets_VERSION           =  = ..
-- * - wxWidgets_COMPONENTS        = stc;gl;html;aui;adv;core;net;base
-- * - wxWidgets_INCLUDE_DIRS      =
-- * - wxWidgets_LIBRARY_DIRS      = C:/supercolliderrepos/buildLua2SC3/wxLuaBundled/build_wx/install/lib/gcc_lib
-- * - wxWidgets_LIBRARIES         =
-- * - wxWidgets_CXX_FLAGS         =
-- * - wxWidgets_DEFINITIONS       =
-- * - wxWidgets_DEFINITIONS_DEBUG =
-- * - wxWidgets_PORTNAME          =
-- * - wxWidgets_UNIVNAME          =
-- * - wxWidgets_UNICODEFLAG       =
-- * - wxWidgets_DEBUGFLAG         =
 WARNING: Unable to find requested wxWidgets component : stc
 WARNING: Unable to find requested wxWidgets component : gl
 WARNING: Unable to find requested wxWidgets component : html
 WARNING: Unable to find requested wxWidgets component : aui
 WARNING: Unable to find requested wxWidgets component : adv
 WARNING: Unable to find requested wxWidgets component : core
 WARNING: Unable to find requested wxWidgets component : net
 WARNING: Unable to find requested wxWidgets component : base
-- *
wxWidgets requested but not found.
-- * WARNING: Specified wxLuaBinding lib 'webview' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'xrc' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'richtext' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'propgrid' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'media' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'xml' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * wxLua using external/system Lua library :
-- *   - include dir : C:/supercolliderrepos/Lua2SC/lua-5.1.5/src
-- *   - library     : C:/supercolliderrepos/buildLua2SC3/LuaJIT/luajit-2.1/src/lua51.dll
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- * WARNING: Doxygen NOT found, wxLua_doxygen target will not be generated.
MINGW_EXTRA_LIBS is -lversion-lshlwapi-luxtheme-loleacc-lws2_32
MINGW_EXTRA_LIBS is -lversion-lshlwapi-luxtheme-loleacc-lws2_32
--     Installing system-libraries: MinGW DLLs.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/supercolliderrepos/buildLua2SC3

with https://github.com/pkulchenko/wxWidgets everything works. I will stick to this.

But then in the building phase:

[ 75%] Building CXX object wxLuaBundled/wxlua/wxLua/modules/luamodule/CMakeFiles/wxLuaModule.dir/__/wxbind/src/wxaui_bind.cpp.obj
cd /d C:\supercolliderrepos\buildLua2SC3\wxLuaBundled\wxlua\wxLua\modules\luamodule && C:\mingws\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin
\g++.exe  -DUNICODE -DWXMAKINGDLL_LUAMODULE -D_UNICODE -DwxLUA_USEBINDING_WXADV=1 -DwxLUA_USEBINDING_WXAUI=1 -DwxLUA_USEBINDING_WXBASE=1 -DwxLUA_USEBI
NDING_WXCORE=1 -DwxLUA_USEBINDING_WXGL=1 -DwxLUA_USEBINDING_WXHTML=1 -DwxLUA_USEBINDING_WXMEDIA=0 -DwxLUA_USEBINDING_WXNET=1 -DwxLUA_USEBINDING_WXPROP
GRID=0 -DwxLUA_USEBINDING_WXRICHTEXT=0 -DwxLUA_USEBINDING_WXSTC=1 -DwxLUA_USEBINDING_WXWEBVIEW=0 -DwxLUA_USEBINDING_WXXML=0 -DwxLUA_USEBINDING_WXXRC=0
 -DwxUSE_UNICODE=1 @CMakeFiles/wxLuaModule.dir/includes_CXX.rsp -DLUA_COMPAT_MODULE -DwxDEBUG_LEVEL=0  -Wall -O3 -DNDEBUG   -Wno-deprecated-declaratio
ns -o CMakeFiles\wxLuaModule.dir\__\wxbind\src\wxaui_bind.cpp.obj -c C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bi
nd.cpp
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp: In function 'int wxLua_wxAuiToolBar_DestroyTool(lua_State*)':

C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp:2311:27: error: 'class wxAuiToolBar' has no member named 'Dest
royTool'; did you mean 'Destroy'?
     bool returns = (self->DestroyTool(toolId));
                           ^~~~~~~~~~~
                           Destroy
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp: In function 'int wxLua_wxAuiToolBar_DestroyToolByIndex(lua_St
ate*)':
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp:2329:27: error: 'class wxAuiToolBar' has no member named 'Dest
royToolByIndex'; did you mean 'FindToolByIndex'?
     bool returns = (self->DestroyToolByIndex(idx));
                           ^~~~~~~~~~~~~~~~~~
                           FindToolByIndex
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp: In function 'int wxLua_wxAuiManager_AlwaysUsesLiveResize(lua_
State*)':
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp:10513:35: error: 'AlwaysUsesLiveResize' is not a member of 'wx
AuiManager'
     bool returns = (wxAuiManager::AlwaysUsesLiveResize());
                                   ^~~~~~~~~~~~~~~~~~~~
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp: In function 'int wxLua_wxAuiManager_HasLiveResize(lua_State*)
':
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp:10802:27: error: 'class wxAuiManager' has no member named 'Has
LiveResize'; did you mean 'actionResize'?
     bool returns = (self->HasLiveResize());
                           ^~~~~~~~~~~~~
                           actionResize
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp: In function 'int wxLua_wxAuiDockUIPart_Get_button(lua_State*)
':
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp:12217:29: error: cannot convert 'wxAuiPaneButton*' to 'lua_Num
ber' {aka 'double'}
     lua_pushnumber(L, self->button);
                       ~~~~~~^~~~~~
In file included from C:/supercolliderrepos/Lua2SC/wxLuaBundled/wxlua/wxLua/modules/wxlua/wxldefs.h:19,
                 from C:/supercolliderrepos/Lua2SC/wxLuaBundled/wxlua/wxLua/modules/wxlua/wxlstate.h:13,
                 from C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp:18:
C:/supercolliderrepos/Lua2SC/lua-5.1.5/src/lua.h:161:58: note:   initializing argument 2 of 'void lua_pushnumber(lua_State*, lua_Number)'
 LUA_API void  (lua_pushnumber) (lua_State *L, lua_Number n);
                                               ~~~~~~~~~~~^
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp: In function 'int wxLua_wxAuiDockUIPart_Set_button(lua_State*)
':
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxaui_bind.cpp:12379:20: error: invalid conversion from 'int' to 'wxAuiPaneBu
tton*' [-fpermissive]
     self->button = val;
                    ^~~

In ZeroBraneStudio build you are using wxLua tag 3.0.0.8. Should I do the same?

sonoro1234 commented 3 years ago

The key seems to be wxWidgets:

I can build latest wxLua with https://github.com/sonoro1234/wxWidgets but not with newest ones.

pkulchenko commented 3 years ago

I'll have to check. Just to confirm, are you trying to build the latest wxwidgets (from the master branch) using the latest wxlua (from the master branch)?

In ZeroBraneStudio build you are using wxLua tag 3.0.0.8. Should I do the same?

There were some changes in the wxwidgets API that were integrated in wxlua with a larger version. v3.0.0.8 should work with the code in https://github.com/pkulchenko/wxWidgets. I'd still expect the most recent (master branch) wxlua version to work with the most recent (master branch) wxwidgets version and if it doesn't, I'll check what may be going on.

sonoro1234 commented 3 years ago

I'll have to check. Just to confirm, are you trying to build the latest wxwidgets (from the master branch) using the latest wxlua (from the master branch)?

I did try wxWidgets 3.1.5 with latest wxLua with the results reported in the first post. I will try again with latest wxWidgets. (fails in cmake from wxWidgets) I only succeded with https://github.com/sonoro1234/wxWidgets

(All builds are done with https://github.com/sonoro1234/Lua2SC/tree/master/wxLuaBundled which could have some errors I am not aware of)

pkulchenko commented 3 years ago

The issues with wxwidgets 3.1.5 are also covered in #98 and #80. You may check those to see if the problems may apply to this case.

I'm building with the most recent wxwidgets to check...

sonoro1234 commented 3 years ago

In linux I am using .\configure to build wxWidgets but in windows I am using CMakeLists.txt , and this was failing with last wxWidgets

May be this explains everything and I can not relay on CMakeList.txt from wxWidgets. It worked with https://github.com/sonoro1234/wxWidgets but got broken afterwards

pkulchenko commented 3 years ago

Interesting; I also always use ./configure and don't see the issue so far; maybe report it to wxwidgets if you suspect that the issue is with CMake configuration there.

sonoro1234 commented 3 years ago

could build (almost) with last wxWidgets cmake. It is broken for 3.1.4 and 3.1.5 but works in last (3.1.6 WIP)

Only getting a linking error for wx.dll

[100%] Linking CXX shared library ..\..\..\..\..\bin\Release\wx.dll
cd /d C:\supercolliderrepos\buildLua2SC3\wxLuaBundled\wxlua\wxLua\modules\luamodule && C:\cmakes\cmake-3.21.3-windows-x86_64\bin\cmake.exe -E cmake_li
nk_script CMakeFiles\wxLuaModule.dir\link.txt --verbose=1
C:\cmakes\cmake-3.21.3-windows-x86_64\bin\cmake.exe -E rm -f CMakeFiles\wxLuaModule.dir/objects.a
C:\mingws\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\ar.exe qc CMakeFiles\wxLuaModule.dir/objects.a @CMakeFiles\wxLuaModule.dir\objects1.rs
p
C:\mingws\i686-8.1.0-release-posix-dwarf-rt_v6-rev0\mingw32\bin\g++.exe -DLUA_COMPAT_MODULE -DwxDEBUG_LEVEL=0  -Wall -O3 -DNDEBUG -shared -o ..\..\..\
..\..\bin\Release\wx.dll -Wl,--out-implib,..\..\..\..\..\lib\Release\libwx.dll.a -Wl,--major-image-version,0,--minor-image-version,0 -Wl,--whole-archi
ve CMakeFiles\wxLuaModule.dir/objects.a -Wl,--no-whole-archive @CMakeFiles\wxLuaModule.dir\linklibs.rsp
../../../../build_wx/install/lib/gcc_lib/libwxmsw31u_stc.a(ScintillaWX.cpp.obj):ScintillaWX.cpp:(.text+0x3194): undefined reference to `ImmGetContext@
4'
../../../../build_wx/install/lib/gcc_lib/libwxmsw31u_stc.a(ScintillaWX.cpp.obj):ScintillaWX.cpp:(.text+0x320f): undefined reference to `ImmSetComposit
ionWindow@8'
../../../../build_wx/install/lib/gcc_lib/libwxmsw31u_stc.a(ScintillaWX.cpp.obj):ScintillaWX.cpp:(.text+0x3302): undefined reference to `ImmSetComposit
ionFontW@8'
../../../../build_wx/install/lib/gcc_lib/libwxmsw31u_stc.a(ScintillaWX.cpp.obj):ScintillaWX.cpp:(.text+0x3322): undefined reference to `ImmReleaseCont
ext@8'
../../../../build_wx/install/lib/gcc_lib/libwxmsw31u_stc.a(ScintillaWX.cpp.obj):ScintillaWX.cpp:(.text.unlikely+0x27e): undefined reference to `ImmRel
easeContext@8'
collect2.exe: error: ld returned 1 exit status

The reason seems to be imm should be added as library

sonoro1234 commented 3 years ago

solved in #102