Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi all,
In our linux OS server i've created one small C application,after compiling i got a.out file which is a executable fiel in Linux platform.But i want that application should run in my pc so can anyone tell how to convert that .out to .exe so that i can run that application on my windows xp OS???
Well, assuming your code is cross-platform to begin with (i.e. is not dependent on Linux-specific libraries or system calls), you would need to recompile the program for Windows. AFAIK there's no way of directly converting a POSIX executable to Windows format...
Hi Mr.Code,
I'm a newbie to linux if you say such technical terms it makes me confuse.so in simple way whats the procedure for converting .out to .exe file???
thanks and regards,
Sri
Quote:
Originally Posted by MrCode
Well, assuming your code is cross-platform to begin with (i.e. is not dependent on Linux-specific libraries or system calls), you would need to recompile the program for Windows. AFAIK there's no way of directly converting a POSIX executable to Windows format...
in simple way whats the procedure for converting .out to .exe file???
There's no way of doing it directly. The executable formats for Linux and Windows are vastly different from each other. It's that simple; you would need to compile the program for Windows.
Hi Brian,
Thanks you very much about that topic Cross Compiling.I was really not knowing about that.But i've a question for you..i hav a cygwin in my pc(windows OS) and my source code is in another m/c(linux OS).Can i directly compile that source code in cygwin without modifying even a single line??
suppose in my source code,
long emp_mobNo[1000];
int extn_No[1000];
char emp_name[1000][50];
int i=0;
FILE *fp; const char file[] = "/home/dbg/Sri/dataFolder/intoFile.txt";
the bold one is showing the path i'm referring for my file operation.this small application is working fine in linux if i run a.out file.But i want that application has to run on windows.So please suggest...
Hi,
i've a question for you..i hav cygwin in my pc(windows OS) and my source code is in another m/c(linux OS).Can i directly compile that source code in cygwin without modifying even a single line??
suppose in my source code,
long emp_mobNo[1000];
int extn_No[1000];
char emp_name[1000][50];
int i=0;
FILE *fp; const char file[] = "/home/dbg/Sri/dataFolder/intoFile.txt";
the bold one is showing the path i'm referring for my file operation.this small application is working fine in linux if i run a.out file.But i want that application has to run on windows.So please suggest...
thanks and regards,
Sri
Quote:
Originally Posted by pixellany
Since you compiled it for Linux, I assume you know the basic procedure for compiling a program.
To compile for Windows, you need to set up a Windows development environment (which will include all the appropriate headers).
Please give us some context for your question....for example, it this a school project?
Can i directly compile that source code in cygwin without modifying even a single line??
a big maybe ???
cygwin will build a LINUX file on windows ( an NOT a win.exe )
but it only builds about 75 to 80 % of programs , and only about 50% without hacking the code.
MinGW will however build a Win.exe FROM linux code ( again for about 75 % of the code will build )
both can be installed ( even with MS VisualStudio ) i have these 3 installed on XP
but this can be a pain in "the out know what" at times
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.