Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Editing/Compiling Programs on Windows
Index -> Programming, C++ -> C++ Tutorials
Goto page Previous  1, 2, 3, 4, 5, 6  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Sun Jul 24, 2005 6:20 pm   Post subject: (No subject)

scuff wrote:
I'm wanting to start some programming with OpenGL. Until now I have been using Dev-C++ as a compiler but it does not work right with the OpenGL code I got from NeHe (http://nehe.gamedev.net). Is there a better FREE compiler for this.


Dev-C++ does not have its own unique compiler. It simply uses the GNU compiler, but does a poor job of it.

Follow the instructions provided in this thread to obtain MinGW. Or install Linux.
Sponsor
Sponsor
Sponsor
sponsor
1of42




PostPosted: Sun Jul 24, 2005 6:21 pm   Post subject: (No subject)

Dunno what you're doing wrong, but I've compiled several of those examples and they work fine in Dev-C++.

Make sure to download the glaux header though, I think it's available under updates/packages.
Hikaru79




PostPosted: Mon Jul 25, 2005 10:52 pm   Post subject: (No subject)

Hmm... in your guide, when you're adding to the path, I'm pretty sure you'd have to add: C:/Program Files/MinGW/bin

It doesnt add directories to the path recursively. So adding just /MinGW/ wouldn't do anything.
[Gandalf]




PostPosted: Wed Aug 17, 2005 5:18 pm   Post subject: (No subject)

[Gandalf] wrote:
7. Add ; and then where you installed Java to. If it was C:/Program Files/MinGW then you would add ;C/Program Files/MinGW to the end of what is already there, do not overwrite what is already there!

Heh, yeah, I guess I was a bit sleepy when I wrote this, JAVA!! and nobody noticed. Laughing

About /bin I will check that either today or tomorrow to make sure, anybody else able to confirm that?
Hikaru79




PostPosted: Thu Aug 18, 2005 11:52 pm   Post subject: (No subject)

[Gandalf] wrote:
[Gandalf] wrote:
7. Add ; and then where you installed Java to. If it was C:/Program Files/MinGW then you would add ;C/Program Files/MinGW to the end of what is already there, do not overwrite what is already there!

Heh, yeah, I guess I was a bit sleepy when I wrote this, JAVA!! and nobody noticed. Laughing

About /bin I will check that either today or tomorrow to make sure, anybody else able to confirm that?

Yeah, I just checked. I wasn't sure about it when I wrote that, but I am now. You have to add /bin to the path entry, it won't look any deeper into subdirectories.
wtd




PostPosted: Fri Aug 19, 2005 12:19 am   Post subject: (No subject)

Hikaru79 wrote:
[Gandalf] wrote:
[Gandalf] wrote:
7. Add ; and then where you installed Java to. If it was C:/Program Files/MinGW then you would add ;C/Program Files/MinGW to the end of what is already there, do not overwrite what is already there!

Heh, yeah, I guess I was a bit sleepy when I wrote this, JAVA!! and nobody noticed. Laughing

About /bin I will check that either today or tomorrow to make sure, anybody else able to confirm that?

Yeah, I just checked. I wasn't sure about it when I wrote that, but I am now. You have to add /bin to the path entry, it won't look any deeper into subdirectories.


Which is how things should work.
Geminias




PostPosted: Thu Sep 22, 2005 12:26 am   Post subject: (No subject)

NOTE: if you are compiling C++ and the command g++ is not recognized even after you ensure that you have specified the right path in the variables,

try renaming g++ command to mingw, or something that doesn't contain the ++'s.
[Gandalf]




PostPosted: Thu Sep 22, 2005 3:19 pm   Post subject: (No subject)

Fixed the /bin path part, missed last few posts for some reason Confused.
Sponsor
Sponsor
Sponsor
sponsor
TokenHerbz




PostPosted: Sat Oct 29, 2005 4:14 am   Post subject: (No subject)

Gandalf wrote:
Quote:

Alright, now is the part that you need to pay attention to. To use the compiler through command prompt, you will need to edit the Windows PATH environmental variable. If you are using Windows 2000 or Windows XP then you have to:
1. Right click on My Computer from the desktop.
2. Select properties.
3. Go to advanced.
4. Click environmental variables.
5. Under system variables select Path
6. Click edit.
7. Add ; and then where you installed MinGW to. If it was C:/Program Files/MinGW then you would add ;C/Program Files/MinGW/bin to the end of what is already there, do not overwrite what is already there!


Im on Windows 98... i tryed to follow those steps but its no good, stopped at step 3...

can you or wtd post the steps for Win 98? thanks.
Hikaru79




PostPosted: Sat Oct 29, 2005 4:00 pm   Post subject: (No subject)

Here's a guide for setting environment variables in Windows 98. I'm hoping you'll be able to follow along with that guide. Simply use those instructions to set the environment variable that Gandalf's instructions tell you to. It should all be good.

Ask if you're confused about something.
Saad85




PostPosted: Fri Dec 30, 2005 11:42 am   Post subject: Re: Editing/Compiling Programs on Windows via MinGW

[Gandalf] wrote:
Now, once you are at the location of your source file, to compile it you have to type:
For C++:
g++ <nameoffile>.cpp -o <nameoffile>.exe
For C:
gcc <nameoffile>.c -o <nameoffile>.exe
For Java (not sure about this one):
gcj <nameoffile>.java -o <nameoffile>.exe


sorry, but im completely new to c++ and am trying to get started. what do you mean by the source? and what am i supposed to put in for the names of the files?
wtd




PostPosted: Fri Dec 30, 2005 2:42 pm   Post subject: (No subject)

Source code is the text you type in to create your program. Object code is the binary gunk that gets fed to your computer after being created by a compiler.

A "source file" is the text document containing the program as you have written it.
Geminias




PostPosted: Fri Dec 30, 2005 9:56 pm   Post subject: (No subject)

incase you didn't understand wtd (he often communicates ineffectively by adding too much jargon)

source code: programming languages are all considered to be codes, so when you write a program you have written it in code, because computers do not understand english (yet). source code is a term which refers to a programs code. it is a sensible term because the source of any program is its code, so if you wanted to see the reason behind a programs behaviour a good place to start would be in the source code.

name of file: is quite simply the name of the file. <name of file> is surrounded by those funny brackets to indicate that it is user inputted. so for instance: if you save a text file as MyProgram.cpp that is the name of the file.
wtd




PostPosted: Fri Dec 30, 2005 10:35 pm   Post subject: (No subject)

Please refrain from personal attacks. They detract from the quality of the discussions here.

If you have something against me, just come out and say it, but do so elsewhere.
Geminias




PostPosted: Fri Dec 30, 2005 11:53 pm   Post subject: (No subject)

it was not a personal attack, it was both a justification and a notification. a justification to expound on your response. a notification to him that he can expect not to understand what you mean many times in the future.

communicating above the level of others is what i said you do, nothing more. if that is a personal attack, then i sincerely do appoligize. I only wish my greatest weakness was communicating above the level of others...

and again, i have nothing against you wtd, i have nothing against anyone.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 6  [ 83 Posts ]
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Jump to:   


Style:  
Search: