Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I got a souce code in linux system. That's why my executeable file can be execute in linux.

Since that I can makefile in linux. But I'd like to make an executeable file in Window system the same.

But I didn't got any source code in Window system. Can I use any software to transfer my

execute file like "aaa" to "aaa.exe" in Window system and can be executed.

share|improve this question

5 Answers 5

Not really, you could compile it on windows so the target exe would be for Windows system. Linux and Windows use different executable formats. Linux uses ELF (http://en.wikipedia.org/wiki/Executable_and_Linkable_Format).

If it is source code that can be compiled under Windows and does not use Unix specific libraries, you are home.

share|improve this answer
    
O.K. I think that may be the conclusion is that I had to do some porting work!!! –  Angela Mar 27 '11 at 2:35

Give some more details. For instance what language are you using? Does your source require any files that would not be present on a Windows system? What compilers are you using in your Linux and Windows environments? Even with out these details the short answer to your question is no, there is no software that will just magically make a program coded specifically for Linux work in Windows. You will need to do some porting work.

share|improve this answer
    
She wants to do it without even recompiling, which will definitely not work (unless the executable is actually an interpreted script, but then why would she be using a Makefile?) –  Robin Green Mar 26 '11 at 10:50
    
I an using gcc compile language in linux Ubuntu, My souce does not require any other file present on Window XP system. –  Angela Mar 27 '11 at 2:31
    
@Angela GCC is a compiler, not a language. GCC will compile many different languages (C, C++, Objective-C, Java, Fortran, Pascal, and Ada to name a few). Still not knowing what language you are using, you could try using MinGW or Cygwin. If your source is Java then you shouldn't have any problem compiling in Windows. So much depends on these details. –  ubiquibacon Mar 27 '11 at 4:10
    
OK! my computer language is C language, I am not really familiar with my source code. I got so many home work to do to study the code. My source code was not java.Thk you! –  Angela Mar 27 '11 at 12:08

You can run some windows applications in Linux using the compatible emulator using WINE. http://www.winehq.org/
http://en.wikipedia.org/wiki/Wine_(software)

Which you can install from synaptic

share|improve this answer
    
OP wants to run Linux software in Windows, not the other way around. –  Dave Sherohman Mar 29 '11 at 10:05

This is one of the reasons people are looking at platforms like java, python and other virtual machine runtime platforms. Your code and executable should be able to run on multiple platforms. Those operating systems on which the platforms have been ported.

Another options would be to install a virtual machine system like virtual box to install linux under your windows environment.

share|improve this answer

If you make a full install of the Cygwin package on your windows machine, you might be able to compile it on windows as well, in the same way that you do in the Linux environment.

If you transfer a linux ELF binary executable to a windows environment it will not work for very many reasons. The executable file formats are different, and the system calls / APIs are completely different.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.