This is the ebuild file for Win32 version of popular cross-platform wxWidgets library cross-compiled using Xmingw. Now you can cross-compile GUI applications for Win32 platforms. Reproducible: Always Steps to Reproduce:
Created attachment 28473 [details] ebuild file for cross-compiled wxWidgets-2.4.2
I don't want to be rude but is anyone working on this? Our company would like to start compiling all wx stuff under linux asap and this would help me a lot! Thanks...
I have not worked on it. Did you try it? If either of you can tell me how I can test it, I'll take a look at it. Also, the copyright would need to be assigned to "Gentoo Foundation" in order to be put in portage.
So where can I put my name? You can test it cross-compiling some wxwidgets-based application and run it under win32 (or wine).
I looked in the documentation that comes with it and searched wxwidgets' site, but I still don't know exactly how to compile anything so I can test it on win32. If you can give me a clue on how to compile it, I'll test it and put it in portage if it works.
Look here: http://bugs.gentoo.org/show_bug.cgi?id=46942 wxActiveX depends on this ebuild, so it is itself an example ;)
Adrian can you give us the commandline you use with gcc to cross-compile something so I can test it on a win32 system please? I've got no idea how to test it otherwise. Thanks.
Sample makefile (from existing commercial product): XMINGW = /opt/xmingw/bin CC = $(XMINGW)/i386-mingw32msvc-g++ WINDRES = $(XMINGW)/i386-mingw32msvc-windres STRIP = $(XMINGW)/i386-mingw32msvc-strip WXDIR = /opt/xmingw/wxWidgets WXWIN_CFLAGS = `$(WXDIR)/bin/wx-config --cxxflags` INFO1_CFLAGS = -I../../Info1Base -I../../Info1Gui -I../../Info1Sql -I../../Info1SqlGui LFLAGS = $(WXWIN_LFLAGS) CFLAGS = $(INFO1_CFLAGS) $(WXWIN_CFLAGS) dbtools.exe: dbtools.o main_dialog.o dbtools_res.o $(CC) -o dbtools.exe dbtools.o main_dialog.o dbtools_res.o \ `$(WXDIR)/bin/wx-config --libs` $(STRIP) dbtools.exe dbtools_res.o: dbtools.rc $(WINDRES) -o dbtools_res.o -i dbtools.rc dbtools.o: dbtools.cpp $(CC) -c $(CFLAGS) dbtools.cpp main_dialog.o: main_dialog.cpp $(CC) -c $(CFLAGS) main_dialog.cpp
Just a few quick notes why this ebuild doesn't work: 1) It should depend on xmingw-w32api 2) It complains it can't find windows.h even if xmingw-w32api is installed
Created attachment 40760 [details] new, fixed version please, try new, fixed version. one problem still exist. you must run /opt/xmingw/bin/ranlib on wxWidgets .a file after installation.
Comment on attachment 40760 [details] new, fixed version fixing mime type
Created attachment 50341 [details] updated ebuild With this ranlib is working, added some USE to be compatibile with devpaks.org (unselect all but _leave selected_ threads (and mayby opengl))
Created attachment 50951 [details] minor improvements (CFLAGS, window.h) i also had some issues with a missing window.h file and also some errors caused by C(XX)FLAGS and LDFLAGS from make.conf. So i modified the ebuild a litte bit and now it works for me, even if i don't know why i have to export some variables. but i don't care as long as it works...
I get this error: In file included from ./include/wx/string.h:51, from ./include/wx/memory.h:20, from ./include/wx/object.h:25, from ./include/wx/event.h:20, from ./include/wx/window.h:23, from ./include/wx/toplevel.h:25, from ./include/wx/frame.h:23, from ./src/msw/app.cpp:32: /opt/xmingw/lib/gcc/i386-mingw32msvc/3.4.2/../../../../i386-mingw32msvc/include/stdio.h:402: error: `off64_t' has not been declared /opt/xmingw/lib/gcc/i386-mingw32msvc/3.4.2/../../../../i386-mingw32msvc/include/stdio.h:409: error: expected init-declarator before "ftello64" /opt/xmingw/lib/gcc/i386-mingw32msvc/3.4.2/../../../../i386-mingw32msvc/include/stdio.h:409: error: expected `,' or `;' before "ftello64" make: *** [accel.o] Error 1 make: *** Waiting for unfinished jobs.... make: *** [app.o] Error 1 I tried to find a declaration for off64_t with: grep -R off64_t /opt/xmingw but it looks like it is completely missing here. Any ideas?
I needed to emerge xmingw-w32api before the compiler to get c++ support. It works like a charm now :)
Created attachment 56241 [details] Autoconf'ed "hello world" with cross compile Here is a autoconfed hello world app. It includes a cross-build.sh script showing how to build it with xmingw. BTW. does anyone knows how to link mingwm10.dll statically into the hello.exe app?
I don't know about linking it in, but where I work we just compile wxwidgets without threading, then you don't need the mingw runtime at all.
Please add this ebuild to the portage or tell us what to fix or just tell that it won't be added.
Sorry Adrian, I've been trying to get other developers to take care of wx* bugs for a few months, but nobody else has joined in so far. I'm compiling it now and will test it tonight. A couple questions: Is it necessary to install it in /opt? We reserve that for binary-only packages. Has this been tested with wxWidgets 2.4.2 only or 2.6.0 also? As for the copyright, it should have the same header as all other ebuilds in portage. You'll be credited in the ChangeLog as the author.
prefix: /opt following xmingw packages! any other ideas? version: 2.4 only copyright: no problem. will you change it committing ebuild or should I upload new version?
I can change the header, no problem there. I have no idea why the xming stuff is in /opt but I'll try to find out why. There is the advantage of having it in /opt though, so you can have wxGTK installed without file collisions. Anyone have a ideas for a package name for this?
I need help, xmingw experts. I can't get this to compile. I'm using: xmingw-w32api-3.1 xmingw-runtime-3.5 xmingw-gcc-3.4.2 xmingw-binutils-2.15.90.0.2 wxAll-2.4.2 checking for gcc... i386-mingw32msvc-gcc checking whether the C compiler (i386-mingw32msvc-gcc -I/opt/xmingw/i386-mingw32msvc/include ) works... yes checking whether the C compiler (i386-mingw32msvc-gcc -I/opt/xmingw/i386-mingw32msvc/include ) is a cross-compiler... yes checking whether we are using GNU C... yes checking whether i386-mingw32msvc-gcc accepts -g... yes checking how to run the C preprocessor... i386-mingw32msvc-gcc -E checking whether i386-mingw32msvc-gcc needs -traditional... no checking for c++... i386-mingw32msvc-g++ checking whether the C++ compiler (i386-mingw32msvc-g++ -I/opt/xmingw/i386-mingw32msvc/include ) works... no configure: error: installation or configuration problem: C++ compiler cannot create executables.
xmingw-gcc should be reemerged after all other xmingw packages. After first emerge you don't have c++ compiler (but check it).
I'm sorry, now I can see, that you have g++ compiled. Look into configure.log for some details.
There was no /opt/bin/xmingw/i386-mingw32msvc-g++ and re-emerging dev-util/xmingw-gcc installed i386-mingw32msvc-g++ I see this is a known issue in bug #64886 Ok, the helloworld compiled and runs fine on Windows for me. I'll add this to cvs today. The name will be dev-libs/wx-xmingw unless anyone speaks up real soon with a better suggestion. Thanks
Added to CVS. Thanks for the ebuild Adrian and help everyone.
Created attachment 86004 [details] ebuild for wxWidgets 2.6.3 This is a new ebuild for wxWidgets 2.6.3. In addition it allows you to have several wxWidgets builds compiled and installed at once (just like in wxGTK ebuild). Ebuild was prepared as SILVERCODERS (http://silvercoders.com) company contribute to Gentoo project.
Created attachment 86005 [details] ebuild for wxWidgets 2.6.3 This is a new ebuild for wxWidgets 2.6.3. In addition it allows you to have several wxWidgets builds compiled and installed at once (just like in wxGTK ebuild). Ebuild was prepared as SILVERCODERS (http://silvercoders.com) company contribute to Gentoo project.
Sorry for a duplicate, there was some error during attachement adding process.
dev-libs/wx-xmingw needs to be punted, not updated
Any reason?
I would be very glad if somebody figured out to cross-compile wxWidgets programs on the new crossdev-MinGW, because I didn't - see http://forums.gentoo.org/viewtopic-t-501680.html If somebody could help me with this, I could even update the ebuild ...
# Mike Frysinger <vapier@gentoo.org> (23 Sep 2006) # Use `emerge crossdev && crossdev mingw32` dev-libs/wx-xmingw dev-util/xmingw-binutils dev-util/xmingw-gcc dev-util/xmingw-runtime dev-util/xmingw-w32api dev-libs/wxactivex Ebuild p.masked as it depends on deprecated package. Closing this bug.