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

windows build failed #17

Closed xzzh999 closed 6 years ago

xzzh999 commented 6 years ago

Hi~

When i use the 3.1.1 branche zip to build, there are lots of errors like:

1>  wxcore_gdi.cpp
1>..\..\..\..\modules\wxbind\src\wxcore_controls.cpp(8032): error C2660: “wxSliderBase::SetTickFreq”: 函数不接受 2 个参数
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(530): error C2065: “wxADJUST_MINSIZE”: 未声明的标识符
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(654): error C2065: “wxBLIT_00220326”: 未声明的标识符
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(655): error C2065: “wxBLIT_007700E6”: 未声明的标识符
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(656): error C2065: “wxBLIT_00990066”: 未声明的标识符
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(657): error C2065: “wxBLIT_00AA0029”: 未声明的标识符
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(658): error C2065: “wxBLIT_00DD0228”: 未声明的标识符
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(659): error C2065: “wxBLIT_BLACKNESS”: 未声明的标识符
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(660): error C2065: “wxBLIT_DSTINVERT”: 未声明的标识符
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(661): error C2065: “wxBLIT_MERGEPAINT”: 未声明的标识符
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(662): error C2065: “wxBLIT_NOTSCRCOPY”: 未声明的标识符
1>..\..\..\..\modules\wxbind\src\wxcore_bind.cpp(663): error C2065: “wxBLIT_NOTSRCERASE”: 未声明的标识符

then i modifed the setup.h:

#define WXWIN_COMPATIBILITY_2_8 1

then i can build most of them except the wxLua_app, wxLuaCan, wxLuaFreeze, there have lots of link errors(i have modified the library path make sure vs can find them):

5>wxlua.cpp.obj : error LNK2001: 无法解析的外部符号 "protected: static struct wxEventTable const wxApp::sm_eventTable" (?sm_eventTable@wxApp@@1UwxEventTable@@B)
5>wxlua-wx31mswu-2.8.12.3.lib(wxlcallb.obj) : error LNK2019: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA),该符号在函数 "public: virtual class wxString __thiscall wxLuaEventCallback::Connect(class wxLuaState const &,int,int,int,int,class wxEvtHandler *)" (?Connect@wxLuaEventCallback@@UAE?AVwxString@@ABVwxLuaState@@HHHHPAVwxEvtHandler@@@Z) 中被引用
5>wxlua-wx31mswu-2.8.12.3.lib(wxllua.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua-wx31mswu-2.8.12.3.lib(wxlua_bind.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua-wx31mswu-2.8.12.3.lib(wxlbind.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua-wx31mswu-2.8.12.3.lib(wxlobject.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_debug-wx31mswu-2.8.12.3.lib(wxldebug.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_debug-wx31mswu-2.8.12.3.lib(wxlstack.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua-wx31mswu-2.8.12.3.lib(wxlstate.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua-wx31mswu-2.8.12.3.lib(wxlconsole.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_bind-wx31mswu-2.8.12.3.lib(wxcore_wxlcore.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_debugger-wx31mswu-2.8.12.3.lib(wxldtarg.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_debugger-wx31mswu-2.8.12.3.lib(wxlsock.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_debugger-wx31mswu-2.8.12.3.lib(wxldserv.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_bind-wx31mswu-2.8.12.3.lib(wxcore_defsutils.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_bind-wx31mswu-2.8.12.3.lib(wxcore_clipdrag.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_bind-wx31mswu-2.8.12.3.lib(wxcore_help.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_bind-wx31mswu-2.8.12.3.lib(wxcore_picker.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_bind-wx31mswu-2.8.12.3.lib(wxcore_dialogs.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_bind-wx31mswu-2.8.12.3.lib(wxcore_mdi.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)
5>wxlua_bind-wx31mswu-2.8.12.3.lib(wxbase_datetime.obj) : error LNK2001: 无法解析的外部符号 "void (__cdecl* wxTheAssertHandler)(class wxString const &,int,class wxString const &,class wxString const &,class wxString const &)" (?wxTheAssertHandler@@3P6AXABVwxString@@H000@ZA)

and i use the cmake gui 3.2.3, wxWidgets-3.1.1 src code and the wxMSW-3.1.1_vc100_Dev prebuild package, i also tried to modify create-release-MSVC2008.bat to ajust vs2010 but still failed.

How can i build this package for wx 3.1.1 version on windows correctly? need u help, thx.

pkulchenko commented 6 years ago

What's the exact ./configure command you are using and what's the compiler? Yes, you'll have to use WXWIN_COMPATIBILITY_2_8 1 to get it to compile.

Here is the configure call I'm using to compile on windows using gcc 4.8.1:

  ./configure --disable-shared --enable-unicode \
    --enable-compat28 \
    --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=no --with-expat=no \
    --with-zlib=builtin --disable-richtext \
    CFLAGS="-Os -fno-keep-inline-dllexport" CXXFLAGS="-Os -fno-keep-inline-dllexport -DNO_CXX11_REGEX"

i can build most of them except the wxLua_app, wxLuaCan, wxLuaFreeze,

Do you need these applications? I don't use them, so can't comment on what exactly needs to be fixed there.

xzzh999 commented 6 years ago

@pkulchenko thank you for u reply.

I use the VC++ 2010 tool chain, i 'll try to fix the link problems later.

xzzh999 commented 6 years ago

Now, I build it ok, because the prebuild package wxMSW-3.1.1_vc100_Dev default set WXWIN_COMPATIBILITY_2_8 to 0, so there were lots's problems. Just compile wxWidgets 3.1.1 youself, everything comes ok.