adhere


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TuT]Configure Netbeans For C/C++ Development
Author Message
Tec-Zilla Offline
Bronze Member
*

Posts: 34
Joined: Oct 2012
Reputation: 0
Given 0 thank(s) in 0 post(s)
Post: #1
Thread [TuT]Configure Netbeans For C/C++ Development
Here is a step by step instructions to setup Netbeans for C/C++ development on your PC using Cygwin compiler.



1.First Download Netbeans IDE 7.2, which is the latest at this time, and be sure to download C/C++/b] Bundle or the All bundle if you would like to develop for [b]Java and PHP too in future or now.


2.After downloading Netbeans Install the software and then go to this site and download the installer for the compiler .

3.Run the cygwin setup, click Next and then select the install directory which is by default C:\cygwin and select local package directory i.e. where you want to keep the installation files and click Next and Select your internet connection and click Next again

now you will see some sites (mirror sites) select any of them and click Next.

4.Now the software will download a list of developer tools from which you have to select only those which will help you run C/C++
program.After it has downloaded the list you will see something like this:-

5.Here is a list of tools to be downloaded for C/C++ development, you can use the search bar inside the cygwin installer to find those files:-

gcc-core

gcc-g++

gcc-g77

gcc-mingw-core

gcc-mingw-g++

gcc-mingw-g77

gdb

make




6.Now, tools are installed now we have to add path to cygwin in Environment variables in windows and for that we need to go to Advanced Settings in the System properties(Properties of Computer).
For Vista/Seven





[b]For XP


[Image: 71-278x300.png]

7.Click on Environment Variables and Find Path under System variables and click on Edit.

[Image: 8-273x300.png]

8.Go to the end of the line and add a semi colon (;) and put the directory to the cygwin library by default it’s C:\cygwin so you will add it like this :-

/////////////////////////Example Starts///////////////////////////////////////////////////
C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Cygwin

(this is just an example don’t copy paste this one just put a semi colon and add directory to cygwin at the last)
/////////////////////////Example Close///////////////////////////////////////////////////

[Image: 9-272x300.png]

9.Now, open Netbeans and on the menu bar click on Tools –> Options Click on C/C++ button under Options and click on add as in the picture.

[Image: 10-300x259.png]

10.Browse the base directory to bin directory inside Cygwin folder like on my PC it’s in C:\cygwin\bin so i will choose that path and then click on OK.

[Image: 112-300x168.png]

11.Make the new tool Default and delete the previous one and you are done.

[Image: 121-300x168.png]



12. now it’s time to check if the compiler works or not.Follow the steps below to check if it works or not.

13.Click on file and then click on New Project and in the category select C/C++ and in the projects select C/C++ Application
Click on Next and put a name for your program and Finish.

[Image: 13-300x168.png]

14.Expand your Program Tree and then inside the Main program tree you will see Source Files expand it as well and inside it there will be main.c, double click it and delete everything inside it.

[Image: 14-300x168.png]

15.Now write this small basic program to check if the compiler works or not:-
Code:
#include<stdio.h>

int main()

{

printf(“Hello”);

return(0);

}
If everything works alright you will see this:-

[Image: 15-300x168.png]



[size=large][align=center]
I had To Delete Some Images from This Post, You Can Visit The Link Below If You Want To See The Post with Images:-
Configuring NetBeans For C/C++
Credits::
-Shailendra Patel
Tec-Zilla
10-19-2012 12:00 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Advertisement
envyus
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)
Navigation
adhere
Sponsors
afil
Alexa Rank