Posts: 500
Threads: 7
Joined: Jun 2005
Been looking for C compilers that can compile to ELF format. . . using Windows as the development environment.
Any good compilers (or tools) that people can recommend?
974277320612072617420666C61696C21 (Hexadecimal for those who don't know)
Posts: 1,439
Threads: 15
Joined: Apr 2003
Posts: 500
Threads: 7
Joined: Jun 2005
Thanks for replying, DrV. I have the Windows port of GCC that came with Dev-C++. I thought that I could compile to ELF files using GCC, but I can't seem to find the right option(s) to add to the command line. If someone could point me in the right direction, it would be appreciated.
974277320612072617420666C61696C21 (Hexadecimal for those who don't know)
Posts: 1,439
Threads: 15
Joined: Apr 2003
Well, what do you mean by 'ELF format'? Many different OSes (and processor architectures, even) can use ELF-format executables...
Posts: 197
Threads: 14
Joined: May 2004
I think you need to use gcc in mingw (what's in dev-c++), or cygwin to compile a version of gcc to compile for linux.
Posts: 500
Threads: 7
Joined: Jun 2005
Quote:Well, what do you mean by 'ELF format'? Many different OSes (and processor architectures, even) can use ELF-format executables...
Sorry for being so vague. I was referring to the "Executable and Linking Format" ("ELF") used by Linux/Unix.
Quote:I think you need to use gcc in mingw (what's in dev-c++), or cygwin to compile a version of gcc to compile for linux.
Thanks. I think the GCC that came with Dev-C++ cannot compile+link Linux executables under Windows. In fact, it seems as though it is just a barebones version of GCC. I have a feeling that I'll need to get cygwin+ARM toolchain or a full installation of GCC.
The reason why I think this is because, assuming GCC is fully installed, this command line should compile it:
[syntax="GCC"]gcc.exe c:/windows/desktop/progName.c -b i386[/syntax]
At least, that's what I've seen anyway.
Thanks again for the help, everybody.
974277320612072617420666C61696C21 (Hexadecimal for those who don't know)
Posts: 197
Threads: 14
Joined: May 2004
you don't need to download cygwin - get mingw at
http://www.mingw.org . Then you need the gcc sources.
An alternative is to get colinux and install the gentoo filesystem along with that. It'll let you code on linux while you're still running windows. You need to install Cygwin's Xorg packages to be able to get graphics.
http://www.colinux.org
Posts: 1,439
Threads: 15
Joined: Apr 2003
You don't necessarily need Cygwin's X packages; you can run a vncserver on the colinux machine and a vnc client (realvnc is nice, and tightvnc is decent) on the Windows side.
Posts: 197
Threads: 14
Joined: May 2004
I'm pretty sure X would be faster
Posts: 500
Threads: 7
Joined: Jun 2005
Thanks, everybody. I'm downloading GCC packages and MinGW32 packages right now. Hopefully they work together.
Edit: Well, I tried it and found that the C program I was using to test (prime number generator), which used the "unsigned long long" type for 2 variables, rendered a warning (but it seems to work still).
Nothing major, but I still get the " couldn't run 'C:\MINGW\BIN\i386-gcc-3.4.2': No such file or directory" error when I try to compile for an i386 machine because the file doesn't exist. Did I forget to download something? :???:
I appreciate all of your help thus far!
974277320612072617420666C61696C21 (Hexadecimal for those who don't know)