User forums > General (but related to Code::Blocks)

wxWidgets cross-compile libraries for debian available on my server

(1/2) > >>

Jenna:
I just uploaded wxWidgets cross-compiling libraries to my server (see signature).

They are called:
libwxmsw2.8-dbg_2.8.7.1-0_XXX.deb
libwxmsw2.8-dev_2.8.7.1-0_XXX.deb
wx2.8-headers-msw_2.8.7.1-0_XXX.deb

where XXX stands for the architecture (either i386 or amd64).

The are based on the slightly modified source-code in debian experimental.
Because of this modifications I also uploaded the source-tar-ball.

The packages are build in the same p-builder-chroot then the C::B-binaries, so they should work with all debian-suites from etch to experimental.
I only tested un unstable/experimental, so if there are any issues feel free to sen me a PN or a mail.

To use them you will also need the ming32 package from your suite.

To setup C::B for cross-compiling create a new Compiler by copying the standard GNU GCC Compiler and call it as you like (I named mine: Mingw GNU GCC Cross-Compiler for Windows).
<Edit>
As next step you have to clear the search-directories, otherwise the compiler/linker/resource-compiler will conflict with the standard libs and headers.
I'm not sure if you can rely on this if you build pure console-applications. I think it's better to put mingw32's include and lib dirs here: /usr/i586-mingw32msvc/include/ for Compiler and Resource Compiler and /usr/i586-mingw32msvc/lib/ for Linker.
</Edit>

Then you have to setup your "Toolchain Executables": they are named as the standards for linux, except that they have a "i586-mingw32msvc-"-prefix.
As binary for the windows-resource compiler you have to use `wx-config --host=i586-mingw32msvc --rescomp`.
The directory can stay unchanged.
I did not use the debugger or the make program until now, but there are no executables in mingw32-package, so I left them unchanged for now.

If you have a working wxWidgets-project (either an old one or newly created) you can add a new Build target, for example "WinRelease".
You do that by duplicating an existing Build target.
In projects properties go to the "Build targets"-tab, chose the target to duplicate (in my case "Release") and click duplicate.
Then change the "Output filename" from "bin/Release/<filename>" to "bin/WinRelease/<filename>.exe", and uncheck at least "Auto-generate filename extension".

In the "Build options" of your project you have to move `wx-config --cflags` from the global "Compiler settings -> Other options" to the one for the standard build targets (Debug and Release) and do the same for the "Linker Settings -> Other options".
The appropriate calls to "wx-config" for the WinRelease must have the parameter: --host=i586-mingw32msvc included and if you want to use it with the C::B standard wxWidgets install on windows (monolithic) you have to add a --static also.

Oh and I nearly forgot, you have to change the compiler's name to the one of your new cross-compiler.

You will need the mingwm10.dll to run your binary with wine or on win. You can find it gzipped in /usr/share/doc/mingw32-runtime/.

If you try to run an executable build with the none-static libs (wx-config called without --static) you have to make the appropriate dll's visible for wine.
I created symlinks from /usr/i586-mingw32msvc/lib/*.dll to ~/.wine/drive_c/windows/system32/ (by the way that would also be a good place to put mingwm10.dll to.

If there are any questions or suggestions, feel free to ask.
I prefer to answer questions in the forum, not via PN or mail, because there might be other users that have the same problem.

Running the about box in the "test.exe" leads to this message (on debian of course):


[attachment deleted by admin]

JGM:
Maybe this should be structured to become an entry on the wiki  :wink: or update the current one

Jenna:

--- Quote from: JGM on March 14, 2008, 06:32:57 pm ---Maybe this should be structured to become an entry on the wiki  :wink: or update the current one

--- End quote ---
I thought about that, and maybe this weekend I find the time to do so.

Jenna:

--- Quote from: jens on March 14, 2008, 06:42:33 pm ---
--- Quote from: JGM on March 14, 2008, 06:32:57 pm ---Maybe this should be structured to become an entry on the wiki  :wink: or update the current one

--- End quote ---
I thought about that, and maybe this weekend I find the time to do so.

--- End quote ---
I just started to write a new wiki article, but I have less time then I would like to have.
You can read and give any suggestions of course, even if the article is not yet ready.
The thumbs of my pictures are not visible, but this is either a problem on the server (missing executable) or wanted. Nevertheless if you click on the link below the thumbs you can see the whole picture.

Ahh... I think I forgot something ...
... the link to the wiki-entry: here it is.

And yes, I know that there is another article about cross-compiling, but I don't want to change it, but I will have a linkt to it (and some other articles in the web) when I'm ready.

JGM:
Really nice! I will try that setup for a crossplatform project I'm working on, since I'm using a virtual machine on ubuntu, I will try that to stop the need of using windows to compile. Is great, really helpful  :D

Navigation

[0] Message Index

[#] Next page

Go to full version