Results 1 to 4 of 4
I wasn't sure if this is the right part of the forum, but I figure this has to be a programming question, so here goes...
I am both a Linux ...
- 09-28-2007 #1Just Joined!
- Join Date
- Nov 2005
- Posts
- 9
Porting Linux Apps to Windows XP - How to?
I wasn't sure if this is the right part of the forum, but I figure this has to be a programming question, so here goes...
I am both a Linux (Fedora Core) user and a Windows XP user. I really love BOTH O/S's for their own merits. There is so much cool, neat open source software in Linux, that I would like to be able to use some of it in Windows XP.
I am aware of Cygwin, but I don't want to just "emulate" Linux within Windows...I want to be able to take the source code of a linux program and turn it into (typical .exe) type Windows programs. I truely admire the software in Linux and would really like to put it to some use within Windows.
I would imagine I would need to re-compile the software using something like a C++ compiler (Bloodshed C++, for example). One question I have is,
if I take open source software code and try to compile it on a Windows based C++ compiler, will the compiler like Bloodshed, be able to do the compilation to an .exe type file?
Is the GNU compiler capable of compiling code to typical MS Windows
.exe or other files?
If there is a LInux software you know of that already does this, or there are tutorials on how to do this, I would appreciate knowing about them. I would love to be able to take some Gnome or KDE sofware and re-compile it into Windows...
Thanks everyone in advance for your responses to my question.
- 09-28-2007 #2
Cygwin isn't an emulator at all. It's a collection of common programs and utilities you usually find on a Linux system (bash, ls, gcc) that have been recompiled into Microsoft Windows executables.
What specific programs are you looking to convert? There may already be native MS Windows ports of them.
Yes. If I remember correctly, Bloodshed Dev is just a Windows front-end for the GNU GCC compiler. GCC/G++ for windows compiles into Windows EXE files.I would imagine I would need to re-compile the software using something like a C++ compiler (Bloodshed C++, for example). One question I have is,
if I take open source software code and try to compile it on a Windows based C++ compiler, will the compiler like Bloodshed, be able to do the compilation to an .exe type file?
Yes, if you compile the code on a MS Windows box using a MS Windows version of GNU GCC/G++. If the program you're trying to port uses any features of the X Windows system (GTK+ or Qt) you might run into problems if your MS Windows installation doesn't have those libraries. They are downloadable for MS Windows, however.Is the GNU compiler capable of compiling code to typical MS Windows
.exe or other files?
Again, what programs specifically are you wanting to use? There might already be a port available.If there is a LInux software you know of that already does this, or there are tutorials on how to do this, I would appreciate knowing about them. I would love to be able to take some Gnome or KDE sofware and re-compile it into Windows...Registered Linux user #270181
TechieMoe's Tech Rants
- 09-28-2007 #3Just Joined!
- Join Date
- Nov 2005
- Posts
- 9
Yes, More Questions, Thank you
Dear TechieMoe - Thank you for that response. As you can see, I am sort of groping my way here, trying to figure things out.
One of the really cool apps is part of the Gnome Desktop, a screen saver that I really like, not sure of the name right here (I am at work).
I am sort of half-way literate in GCC at the console in Linux (Fedora), know about the ./configure, make, make clean etc.
I also have fooled with Bloodshed Dev C++ a bit, and am learning C++ slowly.
So that is why my questions may sound "not educated." I am trying to learn both C++ and something more about the compilers themselves and just get myself educated. I thought a good way to do this would be to take open source code, study it and then translate it into a Windows .exe file just to learn how to do things.
I realize that there are windows ports for a lot of Linux apps, but I am not sure how the originators of those apps use a compiler to compile to a windows program. That is what I want to learn how to do, and also, just to study the code...if there was an on-line How To, that would be helpful to me.
I like the look and feel of the Gnome Desktop a lot and also KDE and would like to take some of it and port it to Windows...not sure where I am going with it yet, but I want to give it a shot.
So I understand I have to take the linux code on XP and convert it using something like Bloodshed. I am assuming that things like typeDefs and include libraries or .h libraries run on Linux are also understood on Bloodshed
in Windows????
Thanks so much and I do appreciate your help on my question.
- 09-28-2007 #4
typedef is part of the C standard... include directives are for header files, and yes windows has libraries, they're the files that end in .dll.
You should check out a gcc tutorial, as well as the c pre processor.


Reply With Quote
