Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 10-18-2005, 03:42 PM   #1
Registered: Oct 2005
Location: Rezekne, Latvia
Distribution: LFS
Posts: 35

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.
Old 10-18-2005, 03:54 PM   #2
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.


Ps. Welcome to LQ!!
Old 10-18-2005, 07:06 PM   #3
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,605

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

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

Rep: Reputation: 22
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
Registered: Oct 2005
Location: Rezekne, Latvia
Distribution: LFS
Posts: 35

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
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
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
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


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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:23 PM.

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