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

ReplaceSelectionRaw build error #71

Closed sonoro1234 closed 4 years ago

sonoro1234 commented 4 years ago

from https://github.com/sonoro1234/Lua2SC/tree/master/wxLuaBundled I have updated wxlua to last master without updating wxWidgets. Building in Windows 7 with mingw-w64 I am getting this error. What should be done?

[ 73%] Building CXX object wxLuaBundled/wxlua/wxLua/modules/luamodule/CMakeFiles/wxLuaModule.dir/__/wxbind/src/wxstc_bin
d.cpp.obj
cd /d C:\supercolliderrepos\buildLua2SC\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_U
SEBINDING_WXAUI=1 -DwxLUA_USEBINDING_WXBASE=1 -DwxLUA_USEBINDING_WXCORE=1 -DwxLUA_USEBINDING_WXGL=1 -DwxLUA_USEBINDING_W
XHTML=1 -DwxLUA_USEBINDING_WXMEDIA=0 -DwxLUA_USEBINDING_WXNET=1 -DwxLUA_USEBINDING_WXPROPGRID=0 -DwxLUA_USEBINDING_WXRIC
HTEXT=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-declarations -o CMakeFiles\wxLuaModule.dir\__\wxbind\src\wxstc_bind.cpp.obj -c C:\supercolliderrepos\
Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxstc_bind.cpp
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxstc_bind.cpp: In function 'int wxLua_wxStyled
TextCtrl_ReplaceSelectionRaw(lua_State*)':
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxstc_bind.cpp:9685:11: error: 'class wxStyledT
extCtrl' has no member named 'ReplaceSelectionRaw'; did you mean 'ReplaceSelection'?
     self->ReplaceSelectionRaw(text);
           ^~~~~~~~~~~~~~~~~~~
           ReplaceSelection
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxstc_bind.cpp: In function 'int wxLua_wxStyled
TextCtrl_ReplaceTargetRERaw(lua_State*)':
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxstc_bind.cpp:9761:26: error: 'class wxStyledT
extCtrl' has no member named 'ReplaceTargetRERaw'; did you mean 'ReplaceTargetRE'?
     int returns = (self->ReplaceTargetRERaw(text, length));
                          ^~~~~~~~~~~~~~~~~~
                          ReplaceTargetRE
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxstc_bind.cpp: In function 'int wxLua_wxStyled
TextCtrl_ReplaceTargetRaw(lua_State*)':
C:\supercolliderrepos\Lua2SC\wxLuaBundled\wxlua\wxLua\modules\wxbind\src\wxstc_bind.cpp:9791:26: error: 'class wxStyledT
extCtrl' has no member named 'ReplaceTargetRaw'; did you mean 'ReplaceTargetRE'?
     int returns = (self->ReplaceTargetRaw(text, length));
                          ^~~~~~~~~~~~~~~~
                          ReplaceTargetRE
pkulchenko commented 4 years ago

It depends on what version of wxwidgets you are using, but may need to go back to whatever version wxlua had before the changes to the API were introduced.

This is caused by wxwidgets making API changes without changing a release number. For example, their current branch is tagged with 3.1.4, even though it hasn't been released yet, so when any API change is being made, the same version number is associated with it. When I tag the change that also implements that API change, it is associated with the same version number (3.1.4), but note that it won't compile against an earlier commit with the same version number.

It's a bit of a mess, but only applies during the period while the branch is no officially released yet. The only solution I see is to increment build number for every API change in wxwidgets (so 3.1.4.0 becomes 3.1.4.1 and so on) and associate those changes with wxlua changes, but wxwidgets doesn't do this.

To make it short. I tried to keep wxlua master to be valid when used with wxwidgets master. Also, the current version should always work with already released wxiwdgets versions (for example, 3.1.3, 3.1, 3.0, and so on). But there is no reliable way to make it work with the current version with API changes.

If you think it's something else, please update the ticket.

sonoro1234 commented 4 years ago

Yes, my wxWidgets was between 3.1.2 and 3.1.3. I am trying now to build with last wxWidgets

wxWidgets building has this error: CMake Error: failed to create symbolic link 'C:/supercolliderrepos/buildLua2SC3/wxLuaBundled/build_wx/install/bin/wx-con fig': operation not permitted which is strange because I thought that this file was for Unix. May be I should not use last wxWidgets master but 3.1.3?

pkulchenko commented 4 years ago

This is indeed strange. Is there a whitespace character in "wx-con fig" or was it just how the message was copied from the output?

sonoro1234 commented 4 years ago

This is indeed strange. Is there a whitespace character in "wx-con fig" or was it just how the message was copied from the output?

white space is mine.

Now building v3.1.3 wxWidgets which was difficult to find because my git client does not show tag v3.1.3 althought it is present in github. I used as last commit for 3.1.3:

Revision: 8a40d23b27ed1c80b5a2ca9f7e8461df4fbc1a31 Author: Vadim Zeitlin vadim@wxwidgets.org Date: 27/10/2019 18:41:42

With v3.1.3 build suceeded. I wont try another wxWidgets until a new taged release is maked!! Thanks for all Paul