LinuxQuestions.org
Visit Jeremy's Blog.
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 10-18-2005, 03:42 PM   #1
midiox
Member
 
Registered: Oct 2005
Location: Rezekne, Latvia
Distribution: LFS
Posts: 31

Rep: Reputation: 15
Compiling Linux software under Windows - your advice?


I am a bit new to Linux but I have Windows programming experience. Recently I found LinuxFromScratch project and it really attracts me. But I have some problem: at home I have a Celeron 700 PC which is a bit slow for compiling some bigger packages and I am still using Linux only in VMWare Workstation - do not want to risk and lose my data during my first Linux experiments. I have access to my friend's 2.0 GHz PC where I can get to the Internet and do other stuff. I do not want to affect friend's hard disk drive so I cannot install Linux there. But I can install some programs which could do compiling.
I have heard a bit about DJGPP, DevC++, MingW and CygWin, but google gave very poor results for my question searches. So maybe there is someone who could suggest something useful - is it really possible, which compiler to choose, what problems can prevent me from doing this? Any useful links would be appreciated.
Thanks.
 
Old 10-18-2005, 03:54 PM   #2
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Rep: Reputation: 30
Problems? Sorry, I don't really understand what you're saying. Personally, I think the best solution for you would be to get yourself a live Linux distro and start off with basic commands on that. Then, once you've mastered trivial things like cp, mv, rm, ln, etc... and a few of their useful options, you could move a step closer to your goal.

I've heard quite a lot about CoLinux, and also about Cygwin. Haven't had time to Google for CoLinux help, but from what I remember the installer was pretty straight forward. I managed to find An Introduction to Cygwin, which you may find useful.

I would not advise going for LFS if you've had little prior experience with Linux - I've been using Linux for over a year and I still don't dare try LFS. It's up to you though - if you'd like to take the jump and get into a _deep_ mess, there's no-one stopping you! Hehe! Maybe a distro with a steep learning curve like Gentoo or Slackware would suit you better. I dunno, go wherever your heart desires.

M.

Ps. Welcome to LQ!!
 
Old 10-18-2005, 07:06 PM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,168

Rep: Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506Reputation: 506
A Celeron 700 slow? It is among the fastest Linux machines I have around! Even in GUI.

jlinkels
 
Old 10-18-2005, 08:23 PM   #4
rsheridan6
Member
 
Registered: Mar 2003
Location: Kansas City
Distribution: Debian unstable
Posts: 57

Rep: Reputation: 21
Cygwin and MingW are great, if you're a masochist. I actually haven't used Cygwin that much and haven't used MingW at all, but I'm always coming across posts/emails from people who can't get things to work under those platforms. Most open source programmers only support them as an afterthought, if at all, so programs tend to break under those platforms (probably they're OK if you use only the most popular packages, because somebody will have probably fixed the bugs already). Try Knoppix or some other Live CD instead.

And hard drives are cheap these days. They're practically giving away smallish ones, and a 5 gigger salvaged from some 1997-era piece of crap would be plenty big enough to play with Linux. That way you could put it in a machine, install Linux on it, and not worry about screwing up somebody elses disk.
 
Old 10-19-2005, 03:55 AM   #5
midiox
Member
 
Registered: Oct 2005
Location: Rezekne, Latvia
Distribution: LFS
Posts: 31

Original Poster
Rep: Reputation: 15
Thanks for ideas. Still it would be nice to hear from somebody who has succeeded in compiling for Linux under Windows. Hmm.. maybe there are no such people at all ? Anyway I'll try DJGPP, let's see what I get.
 
Old 10-19-2005, 10:31 AM   #6
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 31
If I understand you right, you want to compile Linux binaries on a Windows machine? And you want to do that for a full Linux distribution? Why not just grab a distro like Slackware that has all the stuff you will need pre-compiled? You'll save yourself a lot of headaches.

Isn't DJGPP an old DOS compiler? I don't think it can create Linux binaries for you. And Cygwin basically gives you a Linux environment on a Windows OS. It comes with the GNU compilers and stuff, but when you compile with it, they will be Windows binaries, not Linux binaries.

What you need to create binaries for a particular target platform on a different platform is called a cross-compiler. I THINK I've heard that MingW has a cross compiler, but I haven't really messed with it. I usually just compile my Linux binaries in Linux, and Windows binaries in Windows, so I haven't had much need for a cross-compiler.
 
Old 10-20-2005, 07:49 AM   #7
smurff
Member
 
Registered: Sep 2004
Location: England
Distribution: Mandriva 2005LE / Whitebox
Posts: 48

Rep: Reputation: 15
Sorry but I have to agree. cygwin was ok to install and play with but at the end of the day, I installed Mandriva and never looked back. I am the same, I develop on Win and *nix. I code in ansi c so I can pretty much port the c and h files from the two pcs and I am fine. Do note that cygwin does have some issues, not all of the libs work 100% as they should. The thing that made me go to linux in the end was the fact that cygwin doesnt handle some of the multi threading commands on pthreads.

Anyway, make the change and unless you play games alot, you will never look back

Take care
Smurff
 
  


Reply


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
Linux to Windows? Do I jump? Some advice... sundialsvcs Linux - Newbie 18 12-07-2005 08:01 PM
compiling FPGA chip design software designed for windows (visual c++) in linux gogettergary Programming 1 05-09-2005 08:45 AM
Apple software vs Windows software on Linux... r_jensen11 Linux - Software 5 09-25-2003 06:32 PM
Compiling under Windows for Linux joseamuniz Linux - Software 2 06-25-2003 09:28 PM
Cross compiling - Windows Xp -> Linux groston Programming 1 05-31-2002 03:19 AM


All times are GMT -5. The time now is 03:44 AM.

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