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
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
TheGuardian001




PostPosted: Tue Aug 03, 2010 12:23 pm   Post subject: Re: Editing/Compiling Programs on Windows

alex141323 @ Tue Aug 03, 2010 9:00 am wrote:
Gandalf wrote:
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![/list]
Now your done.


Im having difficulty in that part.what should i do in there?.the only choices when you click edit is variable name and variable value.should i add it in F:\Program Files\PC Connectivity Solution\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem???

I really dont know how to work this out.Sad im just a new programmer.


If your original PATH variable was, for example
code:

NAME: PATH
VALUE: C:\Program Files\Program 1\;%SystemRoot%\system32;%SystemRoot%

And MinGW is installed to C:\MinGW, you want to edit your path and add ;C:\MinGW\bin to the end (semicolon is important).
So you end up with
code:

NAME: PATH
VALUE: C:\Program Files\Program 1\;C:\%SystemRoot%\system32;%SystemRoot%;C:\MinGW\bin


Oh, and for future reference, never quote Gandalf. The [] in his name screw up quotes lol.

Ninja-Wizard edit: Quite to the contrary, quote Gandalf at your leisure! In fact, quote Gandalf moar!
Sponsor
Sponsor
Sponsor
sponsor
atal




PostPosted: Sun Jul 17, 2011 10:55 am   Post subject: RE:Editing/Compiling Programs on Windows

Which one of the two do i need a:

1. C++ Editor and complier
or
2. Editor and complier
Nick




PostPosted: Sun Jul 17, 2011 6:31 pm   Post subject: Re: RE:Editing/Compiling Programs on Windows

atal @ Sun Jul 17, 2011 10:55 am wrote:
Which one of the two do i need a:

1. C++ Editor and complier
or
2. Editor and complier



either or, as long as the compiler is a C++ compiler.

C++ code is merely text, just like another other code. It doesn't become machine language until you pass it to a compiler.

If you wanted to, you could open a Java IDE, write C++ code, take the file and give it to a C++ compiler, and have running code.

I recommend either a C++ IDE, or just Notepad++.
atal




PostPosted: Mon Jul 18, 2011 11:22 am   Post subject: Re: RE:Editing/Compiling Programs on Windows

Nick @ Sun Jul 17, 2011 6:31 pm wrote:
atal @ Sun Jul 17, 2011 10:55 am wrote:
Which one of the two do i need a:

1. C++ Editor and complier
or
2. Editor and complier



either or, as long as the compiler is a C++ compiler.

C++ code is merely text, just like another other code. It doesn't become machine language until you pass it to a compiler.

If you wanted to, you could open a Java IDE, write C++ code, take the file and give it to a C++ compiler, and have running code.

I recommend either a C++ IDE, or just Notepad++.


ok. Thanks and the complier i use is DEV-C++
atal




PostPosted: Mon Jul 18, 2011 11:28 am   Post subject: Re: Editing/Compiling Programs on Windows

Hey i am totaly new to this. can someone explain this part to me

[quote]
Now your done. To test to see if it worked, and compile programs, open command prompt. If you don't already have a shortcut then it should be somewhere in the accessories folder in the start menu.

When you are already there, you will see the directory which you are already in. Now what you need to do is browse to where the source file is. You will be using DOS style commands, if you are not already familiar with them then:

type
Now your done. To test to see if it worked, and compile programs, open command prompt. If you don't already have a shortcut then it should be somewhere in the accessories folder in the start menu.

When you are already there, you will see the directory which you are already in. Now what you need to do is browse to where the source file is. You will be using DOS style commands, if you are not already familiar with them then:

type cd <directory> to open a folder and browse it.
type cd .. to go up, 'back' into a more general directory.
type dir to see what folders and files are already in the directory


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:
gcj <nameOfFile>.java -o <nameOfFile>.exe


This just specifies which compiler you are using, the source file, and what the outputted executable file will be called. to open a folder and browse it.
type cd .. to go up, 'back' into a more general directory.
type dir to see what folders and files are already in the directory
apython1992




PostPosted: Mon Jul 18, 2011 2:36 pm   Post subject: RE:Editing/Compiling Programs on Windows

This is trying to teach you how to compile and execute your programs from the command line, rather than through an IDE (by the way, DevC++ is an IDE, not a compiler). I think you should scrap learning with an IDE and use a plain text editor (even Notepad, so you can really learn that source code is just plain text) and a command prompt. Tell us what part of that you don't understand, because it's a lot of work to explain it all when you are probably struggling with only a small part of it.
Gadd




PostPosted: Wed Apr 11, 2012 8:27 pm   Post subject: RE:Editing/Compiling Programs on Windows

Where the hell is Code::Blocks e.e
Cancer Sol




PostPosted: Fri Apr 05, 2013 6:18 pm   Post subject: Re: RE:Editing/Compiling Programs on Windows

Gadd @ 4/11/2012, 8:27 pm wrote:
Where the hell is Code::Blocks e.e

What's e.e?
Are you talking about an .exe? That would be in the Code Blocks folder I guess?
Or if you're asking where to download it... http://lmgtfy.com/?q=code+blocks+mingw+download.
Sponsor
Sponsor
Sponsor
sponsor
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 6 of 6  [ 83 Posts ]
Goto page Previous  1, 2, 3, 4, 5, 6
Jump to:   


Style:  
Search: