Comments for MXE (M cross environment)

07 Feb 2010 10:16 vog

Dear sonicx_,

OpenMP support is indeed an open issue and you're welcome to help. Feel free to join the project mailing list and let's discuss the details there:


03 Dec 2009 14:50 sonicx_

Great work!
however, using the 2.9 release i cannot get OpenMP threads to work with cross-compiled executables.
take this example:

#include <omp.h>
#include <stdio.h>
int main() {
#pragma omp parallel
printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads());

compile it with:

i686-pc-mingw32-g++ -O0 -g3 -fopenmp -static -o test.exe test.cpp

run it on windows, and get a segfault.
please correct me if i made a mistake.

01 Sep 2009 15:07 vog

Dear DJ_Art,

Sorry for the late reply.

Mingw-cross-env is expected to work well on Linux. Each release is tested on many different systems, Debian being one of them. The mingw-cross-env Makefile avoids to build any package documentation or unneeded executables, and it handles code generators properly (i.e. builds them natively instead of cross compiling). So if you encounter build errors, it's definitively a bug in mingw-cross-env.

Please check whether your problem still exists with mingw-cross-env release 2.7. If it does, please join the project mailing list (, restate your problem and add further details such as your Linux distribution, whether 32 or 64 bit, etc. Thanks!


19 Jun 2009 14:38 DJ_Art

Are you sure theora compiles on linux ? It actually, builds, begins to install but then at some point it wants to generate the documentation:

Making install in spec
make[3]: Entering directory `/home/user/src/mingw_cross_env-2.6/tmp-theora/libtheora-1.0/doc/spec'
fig2dev -L pdf -p 0 pic-frame.fig pic-frame.pdf
fig2dev -L pdf -p 0 hilbert-mb.fig hilbert-mb.pdf
[etc .. etc...]
fig2dev -L pdf -p 0 pic_odd_even.fig pic_odd_even.pdf
i586-mingw32msvc-gcc -Wall -Wno-parentheses -O3 -fforce-addr -fomit-frame-pointer -finline-functions -funroll-loops vp3huff.c -o vp3huff
./vp3huff > vp3huff.tex
/bin/sh: ./vp3huff: cannot execute binary file
make[3]: *** [vp3huff.tex] Error 126
make[3]: Leaving directory `/home/user/src/mingw_cross_env-2.6/tmp-theora/libtheora-1.0/doc/spec'
[etc etc other errors]

vp3huff is of course PE32 executable for MS Windows (console) Intel 80386 32-bit, it cannot be run on Linux/Unix, so something should be done about it here, either configure without documentation, or I don't know ...

Other than that, I think it partially installed some files from libtheora, but it doesn't go clean and perhaps other files are missing because it didn't have the chance to go beyond doc/spec target :-/

14 Apr 2009 20:40 mdupont

Great stuff!

18 Mar 2009 23:28 JohnAStebbins

First, I appreciate how easy it was to build and use these tools. But you should be aware that because it generates only static libraries, it is incompatible with glade and gtkbuilder applications. These apps use the exported symbols from the dll's to instantiate all the widgets described in the ui description xml file. The specific failure is g_module_symbol(module, symbol_name, &symbol), where the symbol name is gtk_<some widget>_get_type.

02 Jan 2008 03:08 hansoft

Re: Massively useful script!

> I'm glad you followed my advise, and I'm

> happy it works for you. BTW, what

> project are we talking about? Is is free

> software or a proprietary one?

It's free and hosted here at

I still feel that all this information should be somewhere in your package. If I have the time I'll put it into words, so you can include it (red. already done). It might be helpful to others.

> By all means, please do that!

> Write a simple Howto, maybe just

> explaining how you set up

> mingw_cross_env and cross-compiled your

> application.

When time is available, but the promise stands (red. already done)

Sorry about the 'make install' issue, I missed that one

when I was responding to your previous message. Terribly sorry. The issue is perfectly clear now ;-)

02 Jan 2008 03:00 hansoft

Re: Massively useful script!
Since I don't have your email address, I've prepared a page at:

It is pretty vanilla HTML, which every single browser can read.
There is also an article mentioning your script which has been published at LinuxToday and LXer:

If there are any problems, please notify me.

Hans Bezemer

26 Dec 2007 17:28 vog

Re: Massively useful script!
The quote and your text are duplicated and completely messed up. Can you repeat your answer(s), please?

26 Dec 2007 17:26 vog

Re: Massively useful script!

> I've made a tiny addition to your

> script. Some people may have problems in

> editing a pristine script. That's a

> problem if they have to set $PREFIX'.

> This tiny addition - sorry for the

> additional variable, but without it it

> was pretty ugly - allows the user to set

> it on the CLI.

Thank's for your suggestion, but I think that this problem will be solved anyway when switching to a Makefile. Then you'll be able to do:

make PREFIX=/opt/mingw

which will automatically override the PREFIX variable within the Makefile.


Project Spotlight


An open, cross-platform journaling program.


Project Spotlight


A scientific plotting package.