Linux Users
Do Little, n Do it your Best !
Do Little, n Do it your Best !
How to install gcc in Windows xp ?
GCC is GNU Compiler Collection.
To install it in Windows XP
Step 1. Download the Codeblocks with the mingw From the folowing link
Code::Blocks link
Step 2. After downloading and installing the code blocks
goto directory C:\Program Files\CodeBlocks\MinGW\bin
to check the contents.
Step 3. Copy the Address bar and move to Desktop
Now, Right Click on the My Computer > properties > Advanced
Step 4. Click on Environment Variables and look for the path and click on path,then Edit it.
Step 5. Important one
leave the rest content of address bar untouched and add a Semicolon and then the Copy the content of address bar
;C:\Program Files\CodeBlocks\MinGW\bin
eg: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\CodeBlocks\MinGW\bin
Note that : there is no semicolon at the last address.
Same Way you can add any Command folder address to this path, if you want to use the same commands in XP's command prompt.
Now, Just Click OK and Open Command Prompt.
/* Program to print Hello ! World */
int main()
{
Then Save it and Compile it using ( for c language code) : gcc hello.c -o hello
if you are compiling the C++ code then : g++ hello.cc -o hello
Note that : .cc is the extension for C++ code.
To install it in Windows XP
Step 1. Download the Codeblocks with the mingw From the folowing link
Code::Blocks link
Step 2. After downloading and installing the code blocks
goto directory C:\Program Files\CodeBlocks\MinGW\bin
to check the contents.
Step 3. Copy the Address bar and move to Desktop
Now, Right Click on the My Computer > properties > Advanced
Step 4. Click on Environment Variables and look for the path and click on path,then Edit it.
Step 5. Important one
leave the rest content of address bar untouched and add a Semicolon and then the Copy the content of address bar
;C:\Program Files\CodeBlocks\MinGW\bin
eg: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\CodeBlocks\MinGW\bin
Note that : there is no semicolon at the last address.
Same Way you can add any Command folder address to this path, if you want to use the same commands in XP's command prompt.
Now, Just Click OK and Open Command Prompt.
And Type 'Edit Hello.c' (without quotes)
Note : The .c is extension for C language code.
Type the folowing in your source Code :/* Program to print Hello ! World */
#include<stdio.h>
{
printf("Hello ! World. \n");
system("pause>null");
return 0;
}Then Save it and Compile it using ( for c language code) : gcc hello.c -o hello
if you are compiling the C++ code then : g++ hello.cc -o hello
Note that : .cc is the extension for C++ code.
Subscribe to:
Post Comments (Atom)
Kam a veere....Keep it up.....
ReplyDelete