LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-09-2005, 11:50 AM   #1
bolabala
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Rep: Reputation: 0
Unhappy Linux binary to windows exe


Hi all,
I recently downloaded crossplatform project and compiled it .A Linux binary is produced and it is working fine for Linux..
I need to convert this binary output to windows executable(.exe)
Please suggest me some way...
My project is in C embedded with Tcl....
 
Old 02-09-2005, 11:58 AM   #2
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Rep: Reputation: 45
It can't be done. I don't understand why you would want to convert binary output ot windows exe? If you have the source code that works on windows.. you could make an exe. If u r really looking for soemthing that works on many platforms, go for Java.
 
Old 02-09-2005, 12:13 PM   #3
bolabala
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
I want exe in Linux platform

I want to get the exe from binary in the linux platform itself...
Can any crosscompiling help...
If so how?
 
Old 02-09-2005, 12:19 PM   #4
Padma
Member
 
Registered: Aug 2003
Location: Omaha, NE, USA
Distribution: PCLinuxOS 2007
Posts: 808

Rep: Reputation: 30
Cross-compiling can do it. You need a compiler in Linux that will produce output for Windows. (I assume such a beast exists). But you can't produce a Linux binary and expect it to work in Windows (or vice versa).
 
Old 02-09-2005, 12:26 PM   #5
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
The Cross compiling for Windows on Linux Guide might be of help for you. The binary formats for linux are fundementally different from windows binaries.

You'll have to build a cross-compiler that outputs Windows binaries.
 
Old 02-09-2005, 02:36 PM   #6
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Rep: Reputation: 45
Why not just use something like java? it's code runs on the jvm which will make sure it runs on windows as well as linux.
 
Old 02-09-2005, 11:10 PM   #7
bolabala
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Wink Thanks..

Thanks ..

for u'r suggestion...

.But I desperately need to go with this project...I will try some way to find a solution..
Please do notify me if u have found one.. Thanks again....
 
Old 02-10-2005, 12:33 AM   #8
KimVette
Senior Member
 
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794

Rep: Reputation: 46
Two possibilities come to mind:

1. http://www.informit.com/articles/art...=32075&redir=1

2. You may be able to run gcc for Windows under wine or crossover office (I have no idea whether or not it'll run under wine) and compile the code "natively" (as far as the compiler would know), and it should be scriptable to boot.
 
Old 02-10-2005, 07:23 AM   #9
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
The C source code should be able to compile for Windows with minimal source code changes. If you can't find a way to compile a windows exe in Linux you can easily install gcc on a windows box and compile the project there, I belive it comes with the right TCL libraries to compile that part.

As far as converting a binary Linux executable to a windows executable, they are very different, as was stated above and that's really not a viable option.
 
Old 02-11-2005, 09:01 AM   #10
mhearn
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 57
Google for "mingw rpms", these are win32 crosscompilers that run on Linux. I use them to compile EXEs on linux all the time.
 
Old 02-11-2005, 11:31 AM   #11
bolabala
LQ Newbie
 
Registered: Dec 2004
Posts: 5

Original Poster
Rep: Reputation: 0
Thumbs up Found the solution !!

Hi All,

Hey thanks guys, for u'r suggestions .But I found the solution for this myself...

There is a makefile in windows as in linux called MAK files(.mak extension)

When u make with this file u'll get the .exe in the windows platform....
(nmake makefile.mak)..

I didn't touch the Linux binary either....and got the exe required

Thanks again..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating/Converting Windows exe to Linux sfcesario Programming 6 08-19-2006 07:27 AM
How do you open Windows files--.exe, etc.--in Red Hat Linux Fedora Core 1? jlowe799 Linux - Software 6 04-29-2006 03:39 AM
binary to exe? cryptowicked Linux - Software 1 12-03-2004 02:33 PM
exe file linux to windows degraffenried13 Linux - General 2 04-09-2004 05:57 AM
If *.exe for Windows what is for LinuX? Nukem Linux - Newbie 4 10-05-2003 05:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration