From: Doug C. <dou...@gm...> - 2006-08-06 18:37:48
|
Here are some things I did to build wxLua_Snapshot_2006-08-04.tar.gz on Windows XP using mingw/msys. I don't pretend that these are the "right" fixes for wxLua sources. Many are to generated files rather than source files -- done out of ignorance of the full build process. Others may interfere with successful builds with other tools or on different targets. I am reporting them to help those attempting to build with mingw/msys; maybe the authors/maintainers will find them useful as well. I started with an installed wxWidgets 2.6.3 and wxstedit 1.2.1. I extracted wxLua_Snapshot_2006-08-04.tar.gz and did a $ ../configure --disable-debug --enable-shared --enable-unicode --enable-wxluaedit-app configure was unable to find wxstedit; apparently the method the configure script uses to find wxstedit is not meant for Windows, it seems to mess up with WXDLLEXPORT. Ignoring that, I did a make. It proceeds for a while and then fails to compile wx_bind.cpp (this has been reported earlier on this list as a bug in mingw's gcc 3.4.x). 1. hack wx_bind.cpp after make chokes on it inserting these lines: #ifdef __MINGW32__ const wxPoint wxDefaultPositionHack = wxDefaultPosition; const wxSize wxDefaultSizeHack = wxDefaultSize; #define wxDefaultPosition wxDefaultPositionHack #define wxDefaultSize wxDefaultSizeHack #endif before: WXLUAOBJECT* wxLuaGetObjectList_wx(size_t &count) 2. in modules/wxluadebug/src/splttree.cpp add: #ifdef __MINGW32__ #undef UNREFERENCED_PARAMETER #endif after includes and before: static wxTreeItemId defaultTreeItemId; 3. in {my-build}/modules/Makefile add -lws2_32 to WX_LIBS 4. in {my-build}/apps/Makefile change: WX_RESCOMP = to: WX_RESCOMP = windres --include-dir /usr/local/include/wx-2.6 5. in apps/wxlua/src/wxlua.rc remove "..\\" from icon 6. in {my-build}/apps/Makefile add -lws2_32 to WX_LIBS 7. in apps/wxluacan/src/cansim.rc remove "..\\" from icon 8. in apps/wxluafreeze/src/wxluafreeze.rc remove "..\\" from icon e |
From: John L. <jla...@gm...> - 2006-08-07 21:14:01
|
On 8/6/06, Doug Currie <dou...@gm...> wrote: > Here are some things I did to build wxLua_Snapshot_2006-08-04.tar.gz > on Windows XP using mingw/msys. I don't pretend that these are the > "right" fixes for wxLua sources. Many are to generated files rather > than source files -- done out of ignorance of the full build process. > Others may interfere with successful builds with other tools or on > different targets. I am reporting them to help those attempting to > build with mingw/msys; maybe the authors/maintainers will find them > useful as well. > > I started with an installed wxWidgets 2.6.3 and wxstedit 1.2.1. I > extracted wxLua_Snapshot_2006-08-04.tar.gz and did a > $ ../configure --disable-debug --enable-shared --enable-unicode --enable-wxluaedit-app > > configure was unable to find wxstedit; apparently the method the > configure script uses to find wxstedit is not meant for Windows, it > seems to mess up with WXDLLEXPORT. Ignoring that, I did a make. It > proceeds for a while and then fails to compile wx_bind.cpp (this has > been reported earlier on this list as a bug in mingw's gcc 3.4.x). Use the environment variable WXSTEDIT=c:\...\wxstedit You do have to copy the stedit.lib by hand to the wxLua/lib/xxx lib dir. > 1. hack wx_bind.cpp after make chokes on it inserting these lines: > > #ifdef __MINGW32__ > const wxPoint wxDefaultPositionHack = wxDefaultPosition; > const wxSize wxDefaultSizeHack = wxDefaultSize; > #define wxDefaultPosition wxDefaultPositionHack > #define wxDefaultSize wxDefaultSizeHack > #endif > > before: > > WXLUAOBJECT* wxLuaGetObjectList_wx(size_t &count) Thanks, I've added this code and it should be fixed. > 2. in modules/wxluadebug/src/splttree.cpp add: > > #ifdef __MINGW32__ > #undef UNREFERENCED_PARAMETER > #endif > > after includes and before: > > static wxTreeItemId defaultTreeItemId; Added. > 3. in {my-build}/modules/Makefile add -lws2_32 to WX_LIBS I'm trying to use cygwin to compile... I'll see about where there would be a good place to add this. It's on a real slow machine so maybe it'll be done by tomorrow. :) > 4. in {my-build}/apps/Makefile change: > > WX_RESCOMP = > > to: > > WX_RESCOMP = windres --include-dir /usr/local/include/wx-2.6 We can't hardcode any paths here. I don't know how to fix this, but I would think that the wx-config script should provide the proper paths. See #3, I'll see if I need this too. > 5. in apps/wxlua/src/wxlua.rc remove "..\\" from icon This is what it currently is (below), which is correct for the apps/wxlua/src dir path. What are you suggesting? lua ICON "..\\..\\..\\art\\wxlua.ico" > 6. in {my-build}/apps/Makefile add -lws2_32 to WX_LIBS I'll see what happens for me, see #3. > 7. in apps/wxluacan/src/cansim.rc remove "..\\" from icon > 8. in apps/wxluafreeze/src/wxluafreeze.rc remove "..\\" from icon See #5, exactly what path works? ======================= Thanks for your work, I'll see what I get for #3, 4, 5, 6, 7, 8 in cygwin. Is gcc in cygwin the same as the mingw you use? -John Labenski |
From: John L. <jla...@gm...> - 2006-08-08 21:21:52
|
On 8/7/06, John Labenski <jla...@gm...> wrote: > > 2. in modules/wxluadebug/src/splttree.cpp add: > > > > #ifdef __MINGW32__ > > #undef UNREFERENCED_PARAMETER > > #endif > > > > after includes and before: > > > > static wxTreeItemId defaultTreeItemId; > > Added. The error is really just from the line wxDC operator = &wxDC is private? I've removed the above #undef and just remmed out the line UNREFERENCED_PARAMETER(dc);. -John Labenski |
From: Doug C. <dou...@gm...> - 2006-08-07 22:35:05
|
Monday, August 7, 2006, 5:13:59 PM, John Labenski wrote: > On 8/6/06, Doug Currie <dou...@gm...> wrote: >> Here are some things I did to build >> wxLua_Snapshot_2006-08-04.tar.gz >> on Windows XP using mingw/msys. [...] >[...] >> 4. in {my-build}/apps/Makefile change: >> >> WX_RESCOMP = >> >> to: >> >> WX_RESCOMP = windres --include-dir /usr/local/include/wx-2.6 > We can't hardcode any paths here. I don't know how to fix this, but I > would think that the wx-config script should provide the proper paths. Maybe. --cflags has it, but you'd need to extract it somehow. $ wx-config --cflags -I/usr/local/lib/wx/include/msw-unicode-release-static-2.6 -I/usr/local/include/wx-2.6 -D__WXMSW__ -mthreads -DNO_GCC_PRAGMA Well, $ wx-config --release 2.6 So, maybe: WXPREFIX = $(shell $(WXCONFIG) --prefix) WXRELEASE = $(shell $(WXCONFIG) --release) WX_RESCOMP = windres --include-dir $(WXPREFIX)/include/wx-$(WXRELEASE) Pretty ugly. >> 5. in apps/wxlua/src/wxlua.rc remove "..\\" from icon > This is what it currently is (below), which is correct for the > apps/wxlua/src dir path. What are you suggesting? my files () need, e.g., for apps\wxlua\src\wxlua.rc lua ICON "..\\..\\art\\wxlua.ico" to build without error. This is because the congig generated makefile is in wxLua\my-build\apps\Makefile whereas the hardcoded makefile is in wxLua\apps\wxlua\src\Makefile one level deeper. >> 6. in {my-build}/apps/Makefile add -lws2_32 to WX_LIBS > I'll see what happens for me, see #3. I noted that when I later did a build against a static wxWidgets, $ wx-config --libs included -lwsock32 ...dunno why it was a problem with the DLL version of wxWidgets. $ wx-config --static=no --libs -L/usr/local/lib -mthreads -Wl,--subsystem,windows -mwindows -lwx_mswu_xrc-2.6 -lwx_mswu_qa-2.6 -lwx_mswu_html-2.6 -lwx_mswu_adv-2.6 -lwx_mswu_core-2.6 -lwx_baseu_xml-2.6 -lwx_baseu_net-2.6 -lwx_baseu-2.6 $ wx-config --static=yes --libs -L/usr/local/lib -mthreads -Wl,--subsystem,windows -mwindows /usr/local/lib/libwx_mswu_xrc-2.6.a /usr/local/lib/libwx_mswu_qa-2.6.a /usr/local/lib/libwx_mswu_html-2.6.a /usr/local/lib/libwx_mswu_adv-2.6.a /usr/local/lib/libwx_mswu_core-2.6.a /usr/local/lib/libwx_baseu_xml-2.6.a /usr/local/lib/libwx_baseu_net-2.6.a /usr/local/lib/libwx_baseu-2.6.a -lwxregexu-2.6 -lwxexpat-2.6 -lwxtiff-2.6 -lwxjpeg-2.6 -lwxpng-2.6 -lz -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 So, this looks like a wxWindows build issue. > Thanks for your work, I'll see what I get for #3, 4, 5, 6, 7, 8 in > cygwin. You're welcome. Thank you for your work! > Is gcc in cygwin the same as the mingw you use? It should be close. $ gcc --version gcc.exe (GCC) 3.4.5 (mingw special) Copyright (C) 2004 Free Software Foundation, Inc. Regards, e -- Doug Currie Londonderry, NH |
From: John L. <jla...@gm...> - 2006-08-08 22:52:26
|
On 8/7/06, Doug Currie <dou...@gm...> wrote: > Monday, August 7, 2006, 5:13:59 PM, John Labenski wrote: > > > On 8/6/06, Doug Currie <dou...@gm...> wrote: > >> Here are some things I did to build > >> wxLua_Snapshot_2006-08-04.tar.gz > >> on Windows XP using mingw/msys. [...] > > >[...] I'm still trying to get the apps to compile. so I'll look into the resource problems tomorrow. > >> 6. in {my-build}/apps/Makefile add -lws2_32 to WX_LIBS > > > I'll see what happens for me, see #3. > > I noted that when I later did a build against a static wxWidgets, > $ wx-config --libs > included -lwsock32 > ...dunno why it was a problem with the DLL version of wxWidgets. > > $ wx-config --static=no --libs > -L/usr/local/lib -mthreads -Wl,--subsystem,windows -mwindows > -lwx_mswu_xrc-2.6 -lwx_mswu_qa-2.6 -lwx_mswu_html-2.6 > -lwx_mswu_adv-2.6 -lwx_mswu_core-2.6 -lwx_baseu_xml-2.6 > -lwx_baseu_net-2.6 -lwx_baseu-2.6 > > $ wx-config --static=yes --libs > -L/usr/local/lib -mthreads -Wl,--subsystem,windows -mwindows > /usr/local/lib/libwx_mswu_xrc-2.6.a /usr/local/lib/libwx_mswu_qa-2.6.a > /usr/local/lib/libwx_mswu_html-2.6.a > /usr/local/lib/libwx_mswu_adv-2.6.a > /usr/local/lib/libwx_mswu_core-2.6.a > /usr/local/lib/libwx_baseu_xml-2.6.a > /usr/local/lib/libwx_baseu_net-2.6.a /usr/local/lib/libwx_baseu-2.6.a > -lwxregexu-2.6 -lwxexpat-2.6 -lwxtiff-2.6 -lwxjpeg-2.6 -lwxpng-2.6 -lz > -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 > -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 > > So, this looks like a wxWindows build issue. Humm, I don't get the libs in static, see below. I build wxWidgets 2.6.3.3 (cvs head of 2.6 branch) using this ../configure \ --prefix=/mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win \ --enable-optimise=no \ --enable-debug=yes \ --enable-debug_gdb=yes \ --enable-mem_tracing=no \ --enable-profile=no \ --with-dmalloc=no \ --enable-prologio=no \ --enable-shared=no ### ALSO THIS TOO $ wx-config --list Default config is msw-ansi-debug-2.6 #NOTE: I've also done static too... $ wx-config --cxxflags -I/mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win/lib/wx/include/msw-ansi-debug-2.6 -I/mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/include -I/mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/contrib/include -D__WXDEBUG__ -D__WIN95__ -D__WXMSW__ -DWXUSINGDLL=1 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES $ ./wx-config --libs --static=yes -L/mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win_static/lib /mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win_static/lib/libwx_mswd_xrc-2.6.a /mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win_static/lib/libwx_mswd_qa-2.6.a /mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win_static/lib/libwx_mswd_html-2.6.a /mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win_static/lib/libwx_mswd_adv-2.6.a /mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win_static/lib/libwx_mswd_core-2.6.a /mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win_static/lib/libwx_based_xml-2.6.a /mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win_static/lib/libwx_based_net-2.6.a /mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win_static/lib/libwx_based-2.6.a -lpng -ljpeg -ltiff -lexpat -lz -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lkernel32 -luser32 $ wx-config --libs --static=no -L/mnt/d/wxCVS/wxWidgets/wxWidgets_26/wxWidgets/config_win/lib -lwx_mswd_xrc-2.6 -lwx_mswd_qa-2.6 -lwx_mswd_html-2.6 -lwx_mswd_adv-2.6 -lwx_mswd_core-2.6 -lwx_based_xml-2.6 -lwx_based_net-2.6 -lwx_based-2.6 So I had to paste the libs you had above into the Makefile in the modules dir. "-lz -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32" ====== This does seem like a bug in the wx-config script for gcc in windows, I'lll submit a bug report to wxWidgets tomorrow. > > Thanks for your work, I'll see what I get for #3, 4, 5, 6, 7, 8 in > > cygwin. Still trying to get it going > > Is gcc in cygwin the same as the mingw you use? > It should be close. > > $ gcc --version > gcc.exe (GCC) 3.4.5 (mingw special) > Copyright (C) 2004 Free Software Foundation, Inc. $ gcc --version gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125) Fairly close, but __MINGW32__ is not defined, __GNUWIN32__ is though. =============== Ok, well this will take a little doing, but gcc in MSW seems fairly nice and I'd like to get it working. Regards, John Labenski |