ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to cross compile some programs (especially of the mozilla variety and home grown) for Windows on my Linux computer. I have gcc, but I have no Idea how to cross compile with it, or what I need to keep in mind when doing it.
"I want to cross compile some programs (especially of the mozilla variety and home grown) for Windows on my Linux computer. I have gcc, but I have no Idea how to cross compile with it"
Here is a tutorial for cross compiling with Wintel as the target.
Also check out Cygwin, DJGPP & Mingw. It's fairly easy to setup a toolchain for either of them under Linux that will output Windows executable code. I have all 3 setup under Slackware 10. Best I recall DJGPP was the most difficult to get working. There is a good guide for doing a Cygwin toolchain at colinux. The only bad thing about a Cygwin toolchain is that your app will require the cygwin1.dll be available for running it. All I use them for is CLI apps though.
which went smoothly and I can compile my hello.c test case that
executes fine in a linux shell but nowhere can I find the executable command 'i586-mingw32msvc-gcc' for cross compiling to win32.
What did I miss? Are there other rpms I need to load to get the cross compile features? Is there an 'installing mingw for dummies' tutorial that I could follow?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.