LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-08-2009, 04:04 AM   #1
IanVaughan
Member
 
Registered: Jun 2009
Location: Brighton, UK
Posts: 49

Rep: Reputation: 16
Cross compiling under Windows for Linux


I have two headless servers I am writing code for, and a Windows box networked with them.

I want to compile my code within an IDE on the Windows box (eclipse most likely) and run the compiled binarys on the Linux boxes.

Will this work?
Using Cygwin (or MinGW)?
Thoughts?

Cheers, Ian
 
Old 06-08-2009, 09:46 AM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
Quote:
Originally Posted by IanVaughan View Post
I have two headless servers I am writing code for, and a Windows box networked with them.

I want to compile my code within an IDE on the Windows box (eclipse most likely) and run the compiled binarys on the Linux boxes.

Will this work?
Using Cygwin (or MinGW)?
Thoughts?

Cheers, Ian
Probably not possible at the moment.

I know the opposite, i.e. how to compile for Windows under Linux, and part of the process is having Windows-specific headers and runtime, which do exist for the compile under Linux, run under Windows tools.

I.e. if you want to do it the other way round, you'll need to find/create Linux-specific headers and runtime (glibc) under Windows.

...

Look up "colinux" - it's Linux running inside Windows. Maybe using it you'll be able achieve your goal, though the prerequisites (native-Linux-specific headers + runtime) still have to be satisfied.
 
Old 06-13-2009, 04:09 AM   #3
telemeister
Member
 
Registered: Dec 2007
Location: Brisbane Australia
Distribution: Slackware
Posts: 57

Rep: Reputation: 16
Do you really want to do the compiling on the windows box.

Why not ssh from the windows box onto a linux server and do the coding/compiling on the
OS where it will be running.

You can run something like 'putty' to get ssh client on the windows box.
Run something like 'xming' on the windows box to allow you to open X edit windows etc.
Both these are free software.

Just an alternative suggestion which I think would be easier. (We do this all the time)

Steve
 
  


Reply

Tags
compile, cross, cygwin, linux, windows


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Compiling Linux kernel using Cross Compiler shilu72000 Linux - Newbie 4 05-26-2008 01:45 PM
Cross compiling to Windows binary, including Linux shared libraries Siiiiiii Programming 2 03-09-2007 01:36 AM
cross-compiling windows console apps on linux nathan10177 Programming 2 10-28-2005 09:40 PM
cross-compiling for win under linux rebelcan Linux - Newbie 2 06-17-2003 06:51 AM
Cross compiling - Windows Xp -> Linux groston Programming 1 05-31-2002 04:19 AM


All times are GMT -5. The time now is 07:55 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration