This topic has been archived. It cannot be replied.
-
工作学习 / 专业知识杂谈 / 请问如何在LINUX下将BINARY CODE 生成可执行(EXE)文件?
-spy66(spy);
2006-1-26
(#2746962@0)
-
google cross-compiler...
-spiral(Tuesday);
2006-1-26
(#2746972@0)
-
Or download cygwin
-spiral(Tuesday);
2006-1-26
(#2746973@0)
-
thanks, I have cygwin. I just don't know the command. say, I have a binary code named symmetric, how to convert it to symmetric.exe?
-spy66(spy);
2006-1-26
(#2746981@0)
-
The file you mentioned uses native linux executable format if i am not wrong, unfortunately, Cygwin use native PE executable file format don't support ELF format file,you need find some sort of "loader" or maybe a virtual machine (colinux?) to do that.
-canadiantire(轮胎-M.I.N.K.);
2006-1-26
{87}
(#2747009@0)
-
I have installed imagemagic, so PE or ELF is not a problem. Both of them can be run under my cygwin. What I want is to compile a binary file "symetric" and make a executable file "symetric.exe".Please tell me how to do it. thanks.
-spy66(spy);
2006-1-26
{36}
(#2747031@0)
-
1. What is imagemagic BTW? 2. You can only compile a text (source) file, you cannot compile a binary file, because it is already compiled, you might be able to "hack" a binary file into exe file.
-canadiantire(轮胎-M.I.N.K.);
2006-1-26
(#2747189@0)
-
Imagemagic: http://www.imagemagick.org/script/index.php OK, just tell me how to build a exe file from a binary file. I heard it is someting like " make symmetric symmetric.exe", but I can find the "make" file.
-spy66(spy);
2006-1-26
(#2747207@0)
-
OK, first of all, you need to understand what you are talking about. ImageMagick is a image tool, I guess it has nothing to do what we are talking about, i might be wrong though.make is a tool, you can always find it under /bin or /usr/bin.
"a make file" is a text file, usually named Makefile (capital M), if you download some source package, you can find the Makefile in the package,
if this is the case, generally you need to run the following steps to get the executable file.
0. unpack the source file package, make the directory your default directory
1. ./configure
2. make
3. make install
to make a executable file, which is an exe file in cygwin.
-canadiantire(轮胎-M.I.N.K.);
2006-1-26
{488}
(#2747251@0)