Hello all~!
I am currently in a C programming course which has taught me a fair share of the basics in C and I am very quickly learning that I absolutely LOVE programming, but in any case: I have been curious about getting a little more "advanced" in my programming and the question I have makes me rather bashful because I feel the answer is probably something as simple as "Use the right compiler".
For my Final Grade in the class I have to program the game Mastermind (or Bulls and Cows if you know it by this name?) which isn't what I'm asking for help with actually, what I am wanting to know is how do I create a Windows executable with my finished product? There's no GUI to my game, it's a simple text-based adoption of the good ol' fashioned Mastermind and I would like to be able to share this with some friends, family, and the like who don't natively run Linux as I do.
See the thing is in order to turn in all of our assignments up to this point in the year we have had to SSH into the department Unix server so the professor and the T.A.'s compile everything from there and actually all of the programming I have done thus far has been from Ubuntu so when I personally compile and run the code from my OS it works great, naturally; what I wanted to know is how do I go about compiling something such that there is a simple executable file that I can open up on a windows box to play?
I have been looking around online and haven't found anything with Google (pertaining to C at least) that could help me, I did however stumble upon CodeCall which has had a breadth of other extremely useful information so I thought maybe I'd try here for help with this question?
Creating an .EXE?
Started by Kuroachia, Nov 25 2008 11:28 PM
6 replies to this topic
#1
Posted 25 November 2008 - 11:28 PM
|
|
|
#2
Posted 25 November 2008 - 11:32 PM
Nice code!!!!!!!!!!!
#3
Posted 26 November 2008 - 03:48 AM
Both C and C++ are designed to work on ANY platform, including many where the concept of a monitor doesn't make sense. As a result, they do not include any facilities for graphics.
That said, there are a number of libraries (mainly for C++, but check out GTK for C) that were designed specifically to provide GUI interfaces to those languages. If you are using Ubuntu with Gnome, then you have already seen dozens of programs written in GTK. If you use KDE, you've seen applications written using the QT toolkit.
The one thing to be aware of is that these toolkits/libraries are BIG. I have seen books on wxWidgets, QT, and GTK... each as big as a standard book on C or C++.
That said, there are a number of libraries (mainly for C++, but check out GTK for C) that were designed specifically to provide GUI interfaces to those languages. If you are using Ubuntu with Gnome, then you have already seen dozens of programs written in GTK. If you use KDE, you've seen applications written using the QT toolkit.
The one thing to be aware of is that these toolkits/libraries are BIG. I have seen books on wxWidgets, QT, and GTK... each as big as a standard book on C or C++.
#4
Posted 26 November 2008 - 05:16 AM
Quote
what I wanted to know is how do I go about compiling something such that there is a simple executable file that I can open up on a windows box to play?
#5
Posted 26 November 2008 - 08:37 AM
I appreciate the information WingedPanther but it wasn't quite what I was asking heh, I'm not looking at making any sort of GUI because that's still a little above my abilities I think but I will take your word when I am ready for such endeavors.
CPD--Thank you, but this does lead me to another question that is perhaps equally as silly; If anyone knows of any cross compilers do pass it on but until we stumble upon that knowledge can anyone recommend a small C compiler for windows then? I'll still be writing everything from my Linux box so I won't need an entire IDE on the windows box heh.
CPD--Thank you, but this does lead me to another question that is perhaps equally as silly; If anyone knows of any cross compilers do pass it on but until we stumble upon that knowledge can anyone recommend a small C compiler for windows then? I'll still be writing everything from my Linux box so I won't need an entire IDE on the windows box heh.
#6
Posted 26 November 2008 - 08:45 AM
MinGW is GCC ported to Windows.
#7
Posted 26 November 2008 - 08:58 AM
Perfect thanks!!! I really appreciate the help!


Sign In
Create Account

Back to top









