LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-10-2005, 09:42 AM   #1
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Using gcc to make windows Binaries


Is there a way to use gcc in linux to compile a binary that would work in dos/windows ?

I remember seeing this somewhere but cannot locate the documentation on it anymore.
 
Old 01-10-2005, 09:44 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
DJGPP is a port of the gcc architecture to DOS.

You can also run gcc natively under cygwin (http://gcc.gnu.org/install/specific.html#windows) although you will need to include the cygwin dlls; it won't create stand-alone binaries as far as I am aware.
 
Old 01-10-2005, 11:16 AM   #3
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Original Poster
Rep: Reputation: 87
Not exactly what im asking im wondering how you use linux to build windows binaries. The programs im writeing are very simple so if i could just get gcc to make a binary that would work in windows that would be great if this is not possible ill just port the code over
 
Old 01-10-2005, 11:24 AM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Though I've never used it myself, http://www.mingw.org/ might be what your are looking for.
 
Old 01-10-2005, 11:27 AM   #5
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
You can spend a few hours recompiling gcc as a cross-compiler (follow the instructions on www.gnu.org/software/gcc/) but I don't know if this will work for creating Windows binaries. It isn't set up by default on any distro I've ever seen.

It's certainly less hastle to install Cygwin and gcc on Windows.
 
Old 01-10-2005, 05:24 PM   #6
Genjix
Member
 
Registered: Oct 2003
Location: Pico
Distribution: SUSE 9.1
Posts: 83

Rep: Reputation: 15
you can download mingw precompiled, and it will compile programs, straight off (i use it for developing wxwindows apps).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
installing gcc 4.0.1(binaries) naveenu Fedora - Installation 3 09-28-2005 09:37 AM
Installing GCC Binaries Coookie Monster Linux - Newbie 4 07-23-2005 07:25 PM
No GCC, No Intel binaries... Spotted Cheetah Linux - Software 5 06-10-2005 06:40 PM
compile windows binaries on Linux? muczy Linux - Newbie 4 07-24-2004 01:05 AM
'Make' needs 'Gcc' to compile but 'Gcc' needs 'Make'??? Qwirt Linux - Software 1 07-14-2004 10:54 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration