Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exe compiled 1

Status
Not open for further replies.

thaj

Programmer
May 13, 2002
12
0
0
AP
Hi,

I would like to know whether an exe compiled in windows by gcc compiler, will run in unix OS?.

The question may be silly. Please, help me.

Regards,
Thaj.
 
The answer is a qualified "yes" if you use something like WINE to provide you with a nice compatibility layer.

The answer is definitely "no" if you simply copy the executable and try and run it.

The reason for writing in say C to begin with is so that you can just move the source code and recompile it for any type of machine, within the limits of the portable APIs you've chosen to use.



--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Maybe a better question would be, is there a compiler on Windows that will compile UNIX binaries or visa versa...?
 
Whilst possible, a cross compiler seems to be a relatively rare thing, when there are plenty of native compilers for the target machine.


--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top