Compiling Issues In C Using Windows and Linux

pc_doctor's Avatar, Join Date: Nov 2007
Newbie Member
Hi,

When compiling in emacs in linux i can not run the .exe in windows, though i can in Linux.

How do i compile a .c program to run in Windows?

And likewise when compiling in Dev-C and trying to run the .exe in Linux it doesn't work.

Any help would be grateful

Jon
0
Salem's Avatar, Join Date: Nov 2007
Ambitious contributor
The source code is portable, not the resulting executable.

You copy your .c file to your Linux box, and use gcc to compile it.

You copy your .c file to your windows box, and use dev-c++ to compile it.