| | |
Why linux executable(a.out) doesnt run on windows(.exe) directly?
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: May 2007
Posts: 2
Reputation:
Solved Threads: 0
Dear all,
Why do i need to recompile the code?
Where as the X86 the architecture is same??
The final instruction are also going to be same right???
I assume there must be some difference between windows and linux executable handling in the sense of program loading (loader) but can some expert put some more highlight on this Please..
Thanks
Sirius..
Why do i need to recompile the code?
Where as the X86 the architecture is same??
The final instruction are also going to be same right???
I assume there must be some difference between windows and linux executable handling in the sense of program loading (loader) but can some expert put some more highlight on this Please..
Thanks
Sirius..
First, the program communicates with the operating system differently. To perform input and output, it must talk to the OS with a system call, using a particular protocol, and they use different protocols. Second, the libraries are different. Linux programs expect libraries with functions like printf and whatnot to be in particular places; Windows programs expect them somewhere else. Third, the filesystem and arrangement of where things are stored is different. Fourth, the executable file format is different. The Linux procedure which launches programs expects executable files to be in a particular format (or one of a set of formats?). The .exe file format(s?) is (are?) different. The general scheme of how GUI output is performed is different. The notion of processes is different. And on and on and on.
All my posts may be redistributed under the GNU Free Documentation License.
•
•
Join Date: May 2007
Posts: 2
Reputation:
Solved Threads: 0
•
•
•
•
First, the program communicates with the operating system differently. To perform input and output, it must talk to the OS with a system call, using a particular protocol, and they use different protocols. Second, the libraries are different. Linux programs expect libraries with functions like printf and whatnot to be in particular places; Windows programs expect them somewhere else. Third, the filesystem and arrangement of where things are stored is different. Fourth, the executable file format is different. The Linux procedure which launches programs expects executable files to be in a particular format (or one of a set of formats?). The .exe file format(s?) is (are?) different. The general scheme of how GUI output is performed is different. The notion of processes is different. And on and on and on.
just for a little bit of clarity... does it mean that loader which loads the program is actually OS specific (as it deals with actual allocation of memory and pysical address mapping for program and providing program counter to processor ) and
linker OS-independant.. if not what OS - Dependant information linker provides in ELF ( executable of linux?)
![]() |
Similar Threads
- How to run external .exe programs from java (Java)
- comp. hijacked can't run sfc.exe (Viruses, Spyware and other Nasties)
- Getting an Older Program to Run on Windows XP (Windows tips 'n' tweaks)
- how/ can I run windows xp and win98 on the same computer with 2 seprate hardrives? (Windows NT / 2000 / XP)
Other Threads in the C Forum
- Previous Thread: how to automatically generated programs?
- Next Thread: How to play file in reverse rewind)in directshow
Views: 7143 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for C
#include * append array arrays bash binarysearch changingto char character cm command copyanyfile copypdffile createprocess() database directory drawing dynamic execv feet fgets file floatingpointvalidation fork framework function functions getlogicaldrivestrin givemetehcodez global grade graphics gtkwinlinux histogram homework i/o ide include infiniteloop initialization input interest intmain() iso keyboard kilometer lazy license linked linkedlist linux list looping loopinsideloop. lowest matrix meter microsoft mqqueue oddnumber odf open openwebfoundation overwrite pause pdf pointer pointers posix power process program programming pyramidusingturboccodes read recursion recv recvblocked reversing segmentationfault single socket socketprogramming spoonfeeding standard strchr string student suggestions system test testing threads unix urboc user whythiscodecausesegmentationfault win32api windowsapi






