LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 03:04 AM   #1
IanVaughan
Member
 
Registered: Jun 2009
Location: Brighton, UK
Posts: 50

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, 08:46 AM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
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, 03:09 AM   #3
telemeister
Member
 
Registered: Dec 2007
Location: Brisbane Australia
Distribution: Slackware
Posts: 63

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



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:46 PM.

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