You are not logged in.
I can compile a windows program in mingw32, but it's exported in exe format. Can I compile it to elf format? If so, how?
Offline
I'm trying to use mingw32 to compile a windows native c file, but it compiles to exe. I am using linux. So....
Offline
I'm trying to use mingw32 to compile a windows native c file, but it compiles to exe. I am using linux. So....
... So, why not just compile it with gcc ?
If it is because you need some library (like a dll), you will need to find a Linux equivalent [and probably need some code changes]
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Yeah, I tried native gcc. Not working >.<
Offline
If you just want to compile a windows dll with mingw, you'd do this
i486-mingw32-gcc -o foo.dll -shared foo.c
If you just want to compile the file, but not link, you can do
i486-mingw32-gcc -c foo.c -o foo.o
It's kinda hard to figure out what you actually want though.
Offline
Are you trying to make a Linux program with Windows C code? That won't work because Windows has different libraries than UNIX, among other inconsistencies between the platforms. What kind of GCC errors are you getting?
Personally, I'd rather be back in Hobbiton.
Offline