How do I do the Canadian Cross? (Compile a windows exe from linux)

Started by
5 comments, last by Misery 12 years ago
I've tried different methods, but I have no clue what I'm doing.

The reason why I don't just use windows is because I'm easily distracted by Steam and my 4870 on my Desktop and I dev from a crappy Laptop.because all I can do there is use gcc and a text editor. (That's why I did more rom hacking on windows xp with 256MB of ram than my quad core, lol)

Anyway, I would like to know how do the Canadian Cross with external Libraries, I can't seem to figure it out. Yes, I've "googled it" and found nothing useful.
Advertisement
That's not a Canadian cross, that's just plain old every day garden variety cross compiling.

You may want to look into installing the mingw32 cross compiler into your Linux environment. Use the package manager that comes with your distro to install it. You may also need to install the Windows SDK from Microsoft. Starts your googling again with that clue.

For the record, a Canadian cross is s situation involving 3 architectures (it gets its name from the fact that there are 3 main political parties in Canadian federal politics -- obscure, but it's a fact). For example, if you use Linux to build a compiler that will run on Solaris and build Windows EXEs.

Stephen M. Webb
Professional Free Software Developer

Right, that would be like going from Wintel Linux to Sparc Solaris.

Anyway, I tried the i586-mingw32msvc-g++ and I keep on getting linker errors I'm looking for an in depth guide on using it with libraries and I don't get those linker errors when I try to cross compile, but I don't get them when I do it nativity.

Anyway, I tried the i586-mingw32msvc-g++ and I keep on getting linker errors I'm looking for an in depth guide on using it with libraries and I don't get those linker errors when I try to cross compile, but I don't get them when I do it nativity.


What are those linker errors? You might need to additionally install the MinGW's Win32 headers/libraries.
It's interesting that google came up with several step-by-step examples on the first page when I entered "mingw linux" in the search box. There appears to be many pages of results.

Stephen M. Webb
Professional Free Software Developer


It's interesting that google came up with several step-by-step examples on the first page when I entered "mingw linux" in the search box. There appears to be many pages of results.


Yeah, but It's weird I use Mingw in Linux but there's too many hoops to jump through to try to get it to work. I spent an a whole day trying to figure it out what's going wring, but it works with windows.

I guess it's not worth pursuing because it's wasting production time to try to get a distraction-free environment that linux offers. (because there's no steam on my old laptop)
Maybe try to use a ready to use package in Linux. For example in Debian (testing) or newest Ubuntu there are ready to use mingw debs. Just apt-get them and You can compile whatever You want. I have managed - easily to compile hello world, BLAS and LAPACK using Ubuntu 10.04.

Regards and good luck

This topic is closed to new replies.

Advertisement