Configuring Cygwin C/C++ compiler for Netbeans 6.5 (under Windows)
Posted by Roy Triesscheijn on March 20th, 2009
Today I tried setting up Netbeans as a C IDE, it has built in support for C, but unfortunately enough you have to manually configure a compiler so that you can actually debug / build your C/C++ programs.
Fortunately there is this helpful page at Netbeans.org to help you install Cygwin, a very popular UNIX/Windows C/C++ compiler. However, this helpful page isn’t as helpful as I’d hope at all! It will point you in the right direction to download Cygwin, and will tell you what packages to select for download, it will even tell you to set up your PATH environment variable for Cygwin, but it will assume Netbeans auto detects the correct settings, which it unfortunately doesn’t do. (Well at least at my pc, and I’ve seen a few threads with the same problems around).
So here is my attempt at a more complete overview on installing Cygwin for Netbeans 6.5.
Go to http://www.cygwin.com/setup.exe and download the small setup program. Run it (if your using Vista, set the compatibility options to XP SP2, and run it as administrator). Follow the pretty standard steps until you get to choose the installation packages. If you thought just pressing next would install the most common Cygwin apps, like the compiler (gcc.exe) and the make implementation, unfortunately Cygwin, is not just a C/C++ compiler, it even includes a java compiler, games, documentation, text editors etc. . Ok so just install everything, well that will install the compiler etc., but also 3GB of (for us) useless data. So don’t make the same mistake I did there. We are going to search for the few packages that we actually need. According to the Netbeans.org these are:
select gcc-core: C compiler, gcc-g++: C++ compiler, gdb: The GNU Debugger, and make: the GNU version of the ‘make’ utility.
Unfortunately these aren’t easy to find. For example there is no core package directly visible (we do have base and development though). It took me a while but I think I’ve nailed it down. Select the following packages by clicking the weird “refresh” icon next to them until it says install:
-The entire base package
-In the development package select:
–binutils
–gcc core
–gcc g++
–gcc g77
–gcc mingw core
–gcc mingw g++
–gcc mingw g77
–gdb
–make
–mingw runtime
(note I’m not sure about the mingw packages, this seems to be a seperate C compiler but it doesn’t seem to harm)
After that go to windows configuration screen->advanced->environment variables. And add "C:\Cygwin\Bin” to the PATH variables (or wherever you have located your Cygwin\bin folder, (make sure to separate it from the last one with a ‘;’).
Start Netbeans, navigate to tools->options->C/C++. Check to see if Cygwin is in the list on the left panel. Select it, and then fill in the options as following: (I assume that you’ve installed it in C:\Cygwin)
Base Director: C:\Cygwin\bin
C compiler C:\Cygwin\bin\gcc.exe
C++ Compiler: C:\Cygwin\bin\g++-3.exe*
Fortran Compiler: C:\Cygwin\bin\g77-3.exe*
Make Command: C:\Cygwin\bin\make.exe
Debugger: C:\Cygwin\bin\gdb.exe(* marks optional)
Now make a new C project. And add a new main file to it by right clicking the source directory and selecting New->Main C file. There is an odd chance that the include directives will be underlined with red. This is not a problem, as you will see the program will compile and run fine, but you can’t use intellisense this way so we are going to fix it. (First make sure your PATH variable was correctly set!).
Right click on your project and select properties. Go to build->C compiler (or C++ compiler if you are doing C++). Select the “…” button after Include Directories. And add the “C:\Cygwin\usr\include” directory to the include directories. Save your settings and reload your project. The red lines should’ve disappeared now, leaving you behind with a fully functional C/C++ IDE and compiler in Netbeans. *Yay*!
(I wish someone else would’ve written this before me, so that I wasn’t busy uninstalling a couple of gigabytes of C/C++ tools/compilers/utilities/fonts and text editors!)

March 26th, 2009 at 7:51 PM
I followed the instructions on netbeans and had exactly the same issues. your instructions are way better. Maybe they should add a link to this page on the netbeans page. Good job and thanks for sharing your efforts with the rest of the world.
March 27th, 2009 at 12:52 PM
thanks dude, I thought i done bad
March 27th, 2009 at 12:54 PM
Hey George,
Great that it worked out for you this way! The instructions on the netbeans page are indeed very criptic.
March 30th, 2009 at 5:05 AM
This works.
March 31st, 2009 at 4:11 AM
Tks, its worked!
April 1st, 2009 at 3:20 PM
Hey, Great! it works! I solve that bit of the problem however, i couldn’t run my programs (can’t click run button or command) in netbeans. i have set the system variables the way you specify. Have you encountered this same problem ? I’m using a 32-bit Vista by the way. Cheers
April 1st, 2009 at 8:14 PM
Hey TheRoot, hmm that sounds like a strange problem. I haven’t encountered it yet. Are you sure you’ve restarted Netbeans (and your computer?) and that you have created a new clean C project in Netbeans? (or C++ if you where aiming for that one). Also make sure that in the options in Netbeans the compilers etc.. are listed under the C/C++ section.
April 3rd, 2009 at 3:53 AM
Thanks mate, you’ve done some great work. It took me hours to find out what was wrong…
Really helpful guide!
April 3rd, 2009 at 11:18 AM
Hi. Can anybody help me? When I try to Run/Build/Debug my application I get this error:
—
Running “C:\Programy\cygwin\bin\make.exe -f Makefile CONF=Release” in C:\Documents and Settings\Pavel\Plocha\c\app\Application_1
/usr/bin/make -f nbproject/Makefile-Release.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/Documents and Settings/Pavel/Plocha/c/app/Application_1′
/usr/bin/make -f nbproject/Makefile-Release.mk dist/Release/Cygwin-Windows/application_1.exe
make[2]: Entering directory `/cygdrive/c/Documents and Settings/Pavel/Plocha/c/app/Application_1′
mkdir -p build/Release/Cygwin-Windows
rm -f build/Release/Cygwin-Windows/test.o.d
gcc.exe -c -O2 -I/cygdrive/C/Programy/cygwin/usr/include -MMD -MP -MF build/Release/Cygwin-Windows/test.o.d -o build/Release/Cygwin-Windows/test.o test.c
mkdir -p dist/Release/Cygwin-Windows
gcc.exe -o dist/Release/Cygwin-Windows/application_1 build/Release/Cygwin-Windows/test.o
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -luser32
collect2: ld returned 1 exit status
make[2]: *** [dist/Release/Cygwin-Windows/application_1.exe] Error 1
make[2]: Leaving directory `/cygdrive/c/Documents and Settings/Pavel/Plocha/c/app/Application_1′
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/cygdrive/c/Documents and Settings/Pavel/Plocha/c/app/Application_1′
make: *** [.build-impl] Error 2
Build failed. Exit value 2.
—
I installed according to instructions…
April 4th, 2009 at 1:22 PM
axa.. thanks , i just press to download all packages and netbeans find them alone… , ty
April 6th, 2009 at 9:06 AM
Hi Razz, it seems there is something wrong with -luser32, try searching for that, unfortunately I have no idea what could cause this problem, does this also occur on a new clean C project?
April 26th, 2009 at 4:53 AM
hiss
thanks for the tutorial, it really worked for me, but I just have a problem, it build the programs and all of that but when I try to run them this message come
This application has failed to start because cygwin1.dll was not found
Re-installing the aplication may fix this problem
what could I do?? or I have to re-install all the components again?
just that and thanks!!
April 26th, 2009 at 12:34 PM
Hey Kisa14,
I’ve looked into my Cygwin\bin folder and indeed there is a file called cygwin1.dll located there, can you check if your bin folder has the same file or that it is really missing? You can try to reinstall the cygwin cg and cg++ compilers.
April 26th, 2009 at 2:24 PM
Hi,
Well yes, I just found it there.
But I kind of solve the problem by other way, I just modified the path, because I haven’t put the ‘-3′ there, now I put it and the program is working xP
Any way thanks a lot for the tutorial!!! and for answering so soon ^^
byess
April 26th, 2009 at 3:28 PM
By the way, the prove program just run and close, I can’t even see it xD (but well the other programs I have from my labs run correctly ^^U)
May 3rd, 2009 at 4:54 PM
Ok where did you find packages ? you just google them??? thanks in advance
The entire base package
-In the development package select:
–binutils
–gcc core
–gcc g++
–gcc g77
–gcc mingw core
–gcc mingw g++
–gcc mingw g77
–gdb
–make
–mingw runtime
May 3rd, 2009 at 6:20 PM
Hey John there are in the standard GNU installer
May 4th, 2009 at 10:35 AM
Thanks a lot. It worked. ^^
May 7th, 2009 at 6:02 PM
hey guys its worked …thax a lot
May 13th, 2009 at 6:06 AM
i did exactly the same thing mentioned above,but there is no gcc.exe file in folde “bin”.Instead there is a shortcut called gcc.exe.lnk which links to “/etc/alternatives/gcc”.So i choosed gcc-3.exe for c compiler.But when i make a new c project it says ” cannot find include file “. but it works for c++.dont know y?
May 13th, 2009 at 7:09 AM
Hey Udara,
Unfortunately I don’t have an answer to your question, but maybe someone else visiting this website has. I would recommend figuring out if you can remove all the gcc apps and see if it works the second time, maybe you’ve forgot to select an option. (Alternatively you can try repairing the installation and checking if you missed something)
May 19th, 2009 at 5:16 AM
You can find these in the devel package instead of manually searching.
May 20th, 2009 at 4:57 PM
Thank you so much for posting these instructions- I was stumped for 18 straight hours losing my mind trying to get this to work… your instruction here is a life saver- really thanks again
May 20th, 2009 at 6:59 PM
Hey Cris,
Glad to hear you got this working!
May 30th, 2009 at 3:09 AM
Excelent job man, I had this configuration but I formatted my computer, now I cannot add it to my netbeans, I have the same Udara’s problem.
i’ll aprecciate any help thk
June 3rd, 2009 at 12:46 AM
thnx mate! it works to me
June 5th, 2009 at 1:48 PM
This is so cool.
thanks for your help. i really appreciate your effort.
I’ve been looking for a solution for weeks. thanks to you i can have more fun programming. Thanks a lot dude and may god bless you!
June 24th, 2009 at 1:43 AM
Thanks buddy,
really helped, i think netbean should link your page,
the help page sucks, regarding the instruction they have given
thanks a lot
June 24th, 2009 at 4:45 PM
Hi Udara,
You could use the following steps(Netbeans 6.5):
1. Tools->Options->C/C++->Code Assistance->C Compiler->Add.
2. Add this directory: C:\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include (Replace C:\cygwin\ with your cygwin home)
3. Done
I hope it helps.
Also I think the following packages are optional with gcc’s core compilers:
–gcc mingw core
–gcc mingw g++
–gcc mingw g77
–mingw runtime
June 26th, 2009 at 8:23 PM
hey frds…somebody help me..i followed the same instructions..still i am getting this error..
———————————————————————————————
Running “C:\Program Files\MATLAB\R2007a\bin\win32\gmake.exe -f Makefile CONF=Debug” in C:\SATISH PERSONAL\Application_1
/cygdrive/c/Users/satish/AppData/Local/Temp/make38802.sh: line 2: syntax error: unexpected end of file
C:\Program Files\MATLAB\R2007a\bin\win32\gmake.exe: *** [.validate-impl] Error 2
Build failed. Exit value 2.
—————————————————————————————————
what could be the problem?
June 27th, 2009 at 10:04 AM
Hey Satish, it looks like the compiler and stuff got installed perfectly but that there is an error in your code. Also your not using the GNU compiler but a special compiler for Matlab so it seems so I’m sorry but I can’t really help you with this error.
July 6th, 2009 at 10:49 PM
hey could guyz help me? i’ve been encountering an output error with the C++ sample code “welome”. the project builds and debugs fine but when i run it it shows this in DOS…
“C:/Users/SATEL~1AppData/Loca/Temp/dlight736194469083965267termexec.env: line1: syntaxerror near unexpected token ‘(‘
C:/Users/SATEL~1AppData/Local/Temp/dlight736194469083965267termexec.env: line1: ‘PATH=/bin:/user/bin::cygdrive/C/Windows/system32:/cygdrive/C/Windows:/cygdrive/C/Windows/System32/Wbem:/cygdrive/C/PROGRA~2/COMMON~1/ULEAD~1/MPEG:/cygdrives/DivX\Share/:/cygdrive/C/Program\Files\(x86)/Quicktime/QTSystem/:/cygdrive/C/cygwin/bin: && export PATH’
Press [Enter] to close the terminal…”
the code is very simple w/c is just supposed to output Welcome and this a sample code from Netbeans itself. I followed instructions from Netbeans site and from urs exactly… looks like i should settle for turbo c++… tsk tsk.
July 7th, 2009 at 10:29 AM
Thanks for the steps. But I can’t add the paths to windows configuration screen->advanced->environment variables. Every time I try from “My Computer/Properties”, configuration screen came up for 2 second and disappear. Is it a must to add the path?
July 7th, 2009 at 11:21 AM
Well you can try if it works, but you should really add the path, are you sure you are working on an account that has administrative priviliges?
July 28th, 2009 at 8:15 PM
Thanks a ton, these really helped.
I’m just a beginner and I’m trying to learn a little bit of C before I go to college. I installed this program and followed all the instructions but when I try to run this “Hello, World” program:
#include
main()
{
printf (“Hello, World!”);
return 0;
}
I get the following messages and I have absolutely no clue what they mean, Please Help!
/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/Users/Eugene Kovalev/Briefcase/My Programs/Learning C programming/Learning C’
/usr/bin/make -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/learning_c.exe
make[1]: *** [.build-conf] Aborted (core dumped)
make[1]: Leaving directory `/cygdrive/c/Users/Eugene Kovalev/Briefcase/My Programs/Learning C programming/Learning C’
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 6s)
July 29th, 2009 at 7:09 AM
Hey Eugene, unfortunately I’m still no C(++) expert. Your code does look correct, however I think something went wrong with your include statement, you don’t finish it so your entire program now looks like an include statement.
Try changing the first line to something like:
#include
(for more info on that notation see: http://msdn.microsoft.com/en-us/library/36k2cdd4(VS.71).aspx )
Hope this helps)
August 1st, 2009 at 9:14 PM
I’m having problems, I downloaded and installed using the setup.exe (I used the defaults) from cygwin. It looks like I have everything (even the desk icon) except for the compilers.
In C:\cygwin, there is everything EXCEPT:
C compiler C:\Cygwin\bin\gcc.exe
C++ Compiler: C:\Cygwin\bin\g++-3.exe*
Fortran Compiler: C:\Cygwin\bin\g77-3.exe*
Make Command: C:\Cygwin\bin\make.exe
Debugger: C:\Cygwin\bin\gdb.exe
Maybe I downloaded from a screwy site, but it was on the list.
What can I do to finish my instillation?
August 1st, 2009 at 9:29 PM
Ok, I think I figured it out – forgot to select the compilers in the dev package – Kinda thought they would be there by default.
August 2nd, 2009 at 2:22 PM
Ah yeah it’s a bit strange indeed, but there are so many compilers in the GNU installer that it would be harsh to install them all by default
.
August 3rd, 2009 at 4:02 PM
Thunk you a lot.
” Base Director: C:\Cygwin\bin
C compiler C:\Cygwin\bin\gcc.exe
C++ Compiler: C:\Cygwin\bin\g++-3.exe*
Fortran Compiler: C:\Cygwin\bin\g77-3.exe*
Make Command: C:\Cygwin\bin\make.exe
Debugger: C:\Cygwin\bin\gdb.exe
”
this part was very useful for me. This is not said properly even by the net beans.
August 10th, 2009 at 4:08 PM
Once your C and C++ compilers are installed.
You should only add include libraries to the project that are different from the standard compiler libraries.
To add or check standard libraries that are to be included click on Tools->Options and then select C/C++ at the top of the window that appears.
Now select the Code Assistant tab.
The top panel has a C and a C++ tab.
Now start a cygwin command window
Start->All Programs->Cygwin->Cygwin Bash Shell
Type or copy this command for the c compiler
`gcc -print-prog-name=cc1` -v
where gcc is your C compiler.
This will give you a list of include libraries that the preprocessor is using. Make your otions window match this list.
Now the C++ compiler
`gcc -print-prog-name=cc1plus` -v
gcc is still the C compiler and not the C++ compiler.
This will give you a list of include libraries that the preprocessor is using. Make your otions window match this list. Make sure that the C++ tab is selected or you will be updating the C include list.
Your code assistant now matches your compiler.
Any additional libraries that you now want to use and are not part of the current project should be added to the project->preferences.
August 10th, 2009 at 4:21 PM
Thanks for this helpful tip mate!
August 13th, 2009 at 11:53 AM
Hey, I tried the NetBeans instructions, but, since they were about as helpful as a knife in the back, I fubared something. When I went into the Environment Variables and changed my path, I DELETED the old path and REPLACED it with “C:\cygwin\bin” when, it seems from your instructions I was just supposed to add that (with a
to the END of whatever the hell was there. Now, I have no idea what was there and no way to tell the thing to default back to whatever it was before I screwed it up. If I go into NetBeans, it can’t detect Cygwin. Can you help? I’m running Windows XP Service Pack 3 (if it matters).
August 14th, 2009 at 11:18 AM
Hey QZip, that is a really serious problem since the path variable is not only the C(++) path variable but also the commandline, JAVA, .NET PATH variable (and probably much more) I can’t really give you some way to get it back, maybe you can do a system restore. You can’t copy the PATH variables from someone else because not everyone has installed their applications at the same locations. Your best bet to partially get everything working again if system restore fails is to find someone with XP Service Pack 3 and rougly the same software installed, copying their PATH variable to your pc and hoping you both installed most applications at their default locations.
(I know this all sucks, most modern installers modify the path variable for you, unfortunately Cygwin and especially the Cygwin installer is ‘way odd’.)
Good luck with restoring your computer, sorry I can’t help you I’m running Vista.
September 3rd, 2009 at 6:24 AM
Thank you a lot, this was so helpful for me.
Greetings
September 3rd, 2009 at 10:24 PM
Wow, thanks! That was extremely helpful.
September 5th, 2009 at 3:12 PM
Hi, thank you SO much for this, I can’t tell you how many hours I spend trying to get this done!!!! I’m so used to JAVA that whenever some comes to me asking for help with C (I’m a TA on a fundamentals of programming class) I remember that I haven’t done this stuff for my netbeans…
Does this steps also work on nebeans 6.7?????
PS: sorry for my english… I’m from South America =)
September 5th, 2009 at 4:04 PM
Hey Maru,
No problem, and I think this will work for most versions of Netbeans
.
September 8th, 2009 at 5:35 PM
Hello:
I am in a fix. Please suggest me some help. I am building an application and using Cygwin development environment. All compilation is successful but every time at linking stage I get the error 53 !!
see this -
(LD) exe/DEBUG/DSP1_p0.dxe exe/DEBUG/DSP1_p1.dxe exe/DEBUG/DSP1_sm.dxe
“C:\Program Files/Analog Devices/VisualDSP 4.5/linker.exe” -jcs2l -si-revision
0.5 -T DSP1.ldf -Map ../../Integration/build/exe/DEBUG/DSP1.map.xml -od ../../In
tegration/build/exe/DEBUG -MDBUILD_TYPE_DEBUG
make[1]: *** [../../Integration/build/exe/DEBUG/DSP1_p0.dxe] Error 53
make[1]: Leaving directory `/cygdrive/c/Y050-buildBV/Integration/build’
make: *** [binaries-all] Error 2
Please let me know if you require some more info. But since past one week, I am stupidly wasting my time trying solving this issue but still not successful
September 8th, 2009 at 9:25 PM
Hey Arpit, I have no idea how to fix this issue, best ask it at a forum related to Cygwin C++ compiler. (Maybe the Cygwin website or mailing list?). I’ll leave your comment here so other people might suggest fixes.
September 9th, 2009 at 6:58 AM
Worked very nicely. Thank you very much Roy.
September 10th, 2009 at 11:01 AM
Hello Royal:
I checked with Analog Devices guys today.. they say,
” ‘Error 53′ is being reported by cygwin itself. and reports “The network path was not found”. If the error was being reported by VisualDSP++ tools it would be in our standard error format. For a linker failure, the error message would have the form li####: “li” as a prefix meaning it came from the linker and the “####” being the error number that can be used to index help documentation.
Since the error comes from cygwin we are going to have a limited ability to determine the cause. We can only suggest that you check that the path reported in the error message from cygwin exists and you have proper permission to access it. ”
So they say its not a linker error basically but a Cygwin path error. Can you suggest me what they mean by network path of Cygwin?
September 10th, 2009 at 11:37 AM
Hey Arpit,
I wouldn’t know what they mean with network path, I mean all your files are on a local drive right? Can you check if “../../Integration/build/exe/DEBUG/DSP1_p0.dxe” is indeed 2 folders up from the working directory?
September 10th, 2009 at 12:38 PM
Hey Royal,
Yeah. you are right. It is indeed a local drive! so your explanation is perfect – there cannot be a problem with network path, but then what is causing Error 53? Analog Devices people say its not Visual DSP, its Cygwin causing the error..
September 14th, 2009 at 12:24 PM
Thanks Roy… that was a real help. I’m way past the thrill of spending fruitless hours to make things work that should be intuitive. You are on the list of people to be reimbursed if I ever get to make money from my current C++ development .
September 14th, 2009 at 9:42 PM
Yeah, this could’ve been made so easy! Oh well. Glad you found it helpful, good luck with your C++ programs!
September 15th, 2009 at 12:44 AM
Did my best to follow your instructions, still getting this error when I try to build:
/usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/cygdrive/c/Users/Nathan/Documents/NetBeansProjects/HelloWorldNative’
/usr/bin/make -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/libHelloWorldNative.dll
make[2]: Entering directory `/cygdrive/c/Users/Nathan/Documents/NetBeansProjects/HelloWorldNative’
mkdir -p build/Debug/Cygwin-Windows
make[2]: mkdir: Command not found
make[2]: *** [build/Debug/Cygwin-Windows/newmain.o] Error 127
make[2]: Leaving directory `/cygdrive/c/Users/Nathan/Documents/NetBeansProjects/HelloWorldNative’
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/cygdrive/c/Users/Nathan/Documents/NetBeansProjects/HelloWorldNative’
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
Assistance would be appreciated!
September 18th, 2009 at 2:03 PM
Hi Royal.
Finally got rid of that error. Had a tough time tracing that out. Yeah, as i said, you were correct that AD people were incorrect in telling Err 53 being a network path error.
Interestingly, the project was using a tool MapReader.exe of CadCorp that evaluates linker files. And my machine was not having .netframework installed that caused problem with its initiation and hence at linking stage Visual DSP was unable to commence -> that way, the poor guy Cygwin which was being used had no clue but to show me Error 53 coz of this!!
Thanks for your help. Am glad after eliminating this 53 from my m/c!!
September 19th, 2009 at 6:35 PM
Quite a neat site you have here, Royal! Not sure what it’s all about though.
September 21st, 2009 at 12:46 PM
Thank you very much for your effort.
I’m from Romania.
A good day to you.
September 24th, 2009 at 1:38 PM
I am from South Africa. Thank you very much. This article is the ish, each and every step of the configuration is well laid out.
September 28th, 2009 at 9:19 PM
I have followed your unstruction completely but when I enter “C:\Cygwin\bin\gcc.exe” it enters as red and when i open up netbean it tells me
Could not successfully run the C:\Cygwin\bin\gcc.exe compilerto configure the built-in source file paser.
Please make sure C:\Cygwin\bin\gcc.exe is in your PATH and restart the ide
Its tells me that the compiler is missing or invalid…
Im only new at this so any help would be very much appricated
September 28th, 2009 at 9:21 PM
Hey Joey,
Did you make sure that the file was actually there? See if it is and if g++ is there as well. They might be named differently (Often g++-3.exe and gcc-3.exe).
September 29th, 2009 at 11:51 AM
Hello sir
Ya the files are all in there but as type shortcut….Im using netbeans 6.7.1 on vista…
the c++ compiler is working Just not the c compiler(the one i need)
regards
October 2nd, 2009 at 6:49 PM
This is awesome! I spent so much time trying to figure this out…until I found this post.
Really helpful and clear. Thanks
October 28th, 2009 at 2:13 AM
This site was useful, but I still seem to have problems.
I can’t seem to understand what you meant when you described adding the Path. How exactly does one get to the “Windows Configuration Screen” on Vista?
My compilers seem to have added correctly, but the code I’m trying to work on doesn’t include the appropriate libraries.
I’m new to NetBeans, so any help would be appreciated.
October 28th, 2009 at 11:35 AM
Just right click your ‘my computer’ in the start menu and select properties.
October 28th, 2009 at 4:02 PM
Hello there.
Thanks a lot for this useful tips.
I followed it to start a C++ application on Netbeans6.7.1 windows and every hello world, or Netbeans samples seem to work fine. But I have troubles when I start to use wstring.
When I #include and declare a std::wstring, g++ whispers me that wstring is not part of std…
My paths seem good… I have no clue.
Any idea ?
Thanks again.
October 29th, 2009 at 11:20 AM
It seems that wide strings are not supported by cygwin :/
October 29th, 2009 at 11:21 AM
It seems that wide strings are not supported by cygwin :/
http://www.cygwin.com/ml/cygwin/2009-01/msg00436.html
October 29th, 2009 at 11:43 AM
I found a potential solution : stop using Cygwin and try MinGW.
Everything works now.
Thanks again.
November 6th, 2009 at 5:23 PM
building is successful but it won’t run…. The system cannot find the path specifiedProcess is started in an external terminal …
RUN FAILED
this message appears… any idea ,
November 6th, 2009 at 8:11 PM
Thanks so much!!! ^_^
November 8th, 2009 at 6:28 PM
No problem
November 8th, 2009 at 6:29 PM
Kibre, I have no idea maybe someone else will find a solution.
November 13th, 2009 at 3:44 PM
Followed all instructions as above, but still stuck up with this error
Can you please help..
Error:
CLEAN SUCCESSFUL (total time: 200ms)
nbproject/Makefile-Debug.mk:79: .dep.inc: No such file or directory
make: /bin/sh: Command not found
make: *** [.depcheck-impl] Error 127
BUILD FAILED (exit value 2, total time: 187ms)
November 14th, 2009 at 4:49 PM
You are GOD!!!
Your instructions just saved me hours of wasted time and you may also have saved my computer from ending up like this:
http://www.youtube.com/watch?v=0qKxSf5SNj0&feature=related
ThX!
November 15th, 2009 at 4:47 PM
Hey Sonal, doesn’t look like a cygwin error to me. Maybe try searching for err127 and depcheck-impl
November 15th, 2009 at 4:48 PM
Haha thanks!
March 25th, 2010 at 3:18 PM
Hi,
I have install cygwin. i aim able to create exe file through netbeans. But when i am trying to create ddl file it create all obj file but unable to create ddl file.It says use mingw.
kindly help me how to create ddl file.
Thanks
Bijay
March 25th, 2010 at 6:05 PM
Hey Bijay, you can manualy compile obj files into dll files. Obj files are an intermediary form that makes it easier to recompile dll files when you only change a small part of the code.
For more info see here: http://cpp.comsci.us/process/build.html
April 13th, 2010 at 9:56 AM
I need help in this error while trying to execute a C++ file in netbeans 6.8 using cygwin as compiler:
http://img695.imageshack.us/img695/7076/errokf.jpg
It seens like the POSIX points to cygdrive/c/Arquivos de programas… and I guess it should point to C:\Arquivos de programas…
I tried the “nodosfilewarning” and it just worked to hide some errors, I still can not execute.
Any solution?
April 13th, 2010 at 10:14 AM
I’m sorry Gilmar, I have no idea how to solve this error, are you sure you’re path variables are all correct? I don’t really understand what you’re doing here btw, normally you’d run this all from Netbeans and Netbeans might take care of this.
April 28th, 2010 at 12:22 PM
I will, as always, be the curmudgeon and say that it sounds like any IDE may be overkill. Get a nice text editor and compile with gcc/g++, if things get too complex, use make.
April 29th, 2010 at 8:40 AM
Hey Marck_Don, thanks for your comment. Although sometimes IDEs can be a hassle. I really think that autocompletion, intellisense, warnings without compiling, and of course debugging in an IDE are so much easier than using just a text editor that I can really recommend it. Ofcourse some languages don’t really lend themselves very good for an IDE (PHP anyone?). I think C++ is not one of those languages.
Of course some people like a bit lighter application to develop, I’ve heard good things about VIM for example, some autocompletion and intellisense, without being such a heavy application. In the end it all comes down to what you prefer
.
(Also, Netbeans is really not the fastest IDE, I dont understand all those JAVA based IDEs anyways, especially Eclipse is slow as hell).
May 31st, 2010 at 11:02 AM
Hi roy, thank for your tips, but i still have problem.
my gcc doesn’t work. i try manually compile hello.c with gcc in cygwin but gcc doesn’t generate hello.o. i write gcc -c hello.c why didn’t work.. i need your tips..
June 2nd, 2010 at 12:57 AM
Hey Hendro, what command line options are you using to compile hello.c, do you see any warnings or errors?
July 24th, 2010 at 9:21 PM
Awesome tutorial. I was looking for the same…
July 24th, 2010 at 9:38 PM
Thanks!
July 27th, 2010 at 10:55 AM
Thank you!! The NetBeans notes are definitely not good enough and I was getting very frustrated. Two minutes after reading your notes and I’m all set up!
Have a medal