No longer updated: new and updated blog (including old content) at

Archive for, please update your bookmarks

Configuring Cygwin C/C++ compiler for Netbeans 6.5 (under Windows)

Posted by Roy Triesscheijn on Friday 20 March, 2009

Note: since the 1st of December 2009, this blog was moved to, all content here should be considered archived, new content, updates, comments, etc… will no longer be released here. A fresh copy of this article exists at the new website, here you can post comments and ask questions which I will try to answer asap.


Roy Triesscheijn

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 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 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 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:
–gcc core
–gcc g++
–gcc g77
–gcc mingw core
–gcc mingw g++
–gcc mingw g77
–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!)


161 Responses to “Configuring Cygwin C/C++ compiler for Netbeans 6.5 (under Windows)”

  1. George said

    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.

    • Hey George,

      Great that it worked out for you this way! The instructions on the netbeans page are indeed very criptic.

    • Kelvin said

      Subject: Cygwin new version faulty
      Solution: Cygwin 1.5 thru setup_legagy.exe

      OK, Im having been trying to install the c/c++ plugin for netbeans IDE 6.9 using the instruction from the netbeans support and from this website:

      so decided to use cygwin as the build engine. the build was fine but it crashes when I run it. So I dig and dig. I even open up its location in my c drive and run it manually. finally, I found this different error message:

      “entry point cygwin_create_path could not be located in dynamic link library cygwin1.dll”

      This narrows down the problem to cygwin after googling, I found that it might be a compatibility issue with the new cygwin update 1.7 So I install the 1.5 version instead and it worked!!! Here is how you can do it too: download the older version off the cygwin website:the setup_legacy.exe run the .exe make sure to change to a new root directory name (if you have 1.7 already) for the cygwin download as you will be prompted. create a location for download cache inside that directory once you chose a mirror you can search for these in the development: –binutils –gcc core –gcc g++ –gcc g77 –gcc mingw core –gcc mingw g++ –gcc mingw g77 –gdb –make –mingw runtime

      hit next to install the cygwin package

      set the environment variable (thru advanced system setting for vista). under system variable add C:\cygwin\bin; to the path variable

      open up netbeans and open new project c/c++ app under tools chose options and click on the c/c++ to add host add host. Chose to path to the root location of cygwin and then bin make it default it will have a name like cygwin_1 or whatever ex: C:\cygwin_legacy\bin netbeans will detect all compilers etc OK the thing

      Now right click on the project and hit property click on build to the right, change the tool collection to cygwin_1 (or whatever the name was)

      write a hello world program (I did in c++)

      debug and run the thing It should work! I hope this will help others like me in the future I spent 4-5 hours over several days trying to figure this bug out. It was hard because the error message was not helpful unless you run the .exe manually. Only then you will get the entry point message.

      Here is the build message (successful but crashed when run):

      “/usr/bin/make” -f nbproject/ QMAKE= SUBPROJECTS= .build-conf make[1]: Entering directory /cygdrive/c/Users/Kelvin/Documents/NetBeansProjects/CppDebug’ “/usr/bin/make” -f nbproject/ dist/Debug/Cygwin_1-Windows/cppdebug.exe make[2]: Entering directory/cygdrive/c/Users/Kelvin/Documents/NetBeansProjects/CppDebug’ mkdir -p build/Debug/Cygwin_1-Windows rm -f build/Debug/Cygwin_1-Windows/main.o.d g++-3.exe -c -g -MMD -MP -MF build/Debug/Cygwin_1-Windows/main.o.d -o build/Debug/Cygwin_1-Windows/main.o main.cpp mkdir -p dist/Debug/Cygwin_1-Windows g++-3.exe -o dist/Debug/Cygwin_1-Windows/cppdebug build/Debug/Cygwin_1-Windows/main.o
      make[2]: Leaving directory /cygdrive/c/Users/Kelvin/Documents/NetBeansProjects/CppDebug’ make[1]: Leaving directory/cygdrive/c/Users/Kelvin/Documents/NetBeansProjects/CppDebug’

      BUILD SUCCESSFUL (total time: 24s)

  2. John Derrick said

    thanks dude, I thought i done bad

  3. Josh said

    This works.

  4. marcellus | wolfdart said

    Tks, its worked!

  5. TheRoot said

    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 🙂

    • 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.

  6. John Greece said

    Thanks mate, you’ve done some great work. It took me hours to find out what was wrong…
    Really helpful guide!

  7. razz said

    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/ SUBPROJECTS= .build-conf
    make[1]: Entering directory `/cygdrive/c/Documents and Settings/Pavel/Plocha/c/app/Application_1′
    /usr/bin/make -f nbproject/ 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…

  8. MakiS said

    axa.. thanks , i just press to download all packages and netbeans find them alone… , ty 😉

  9. kisa14 said

    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!!

    • 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.

  10. kisa14 said

    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 ^^

    • kisa14 said

      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)

  11. JOhn said

    Ok where did you find packages ? you just google them??? thanks in advance
    The entire base package
    -In the development package select:
    –gcc core
    –gcc g++
    –gcc g77
    –gcc mingw core
    –gcc mingw g++
    –gcc mingw g77
    –mingw runtime

  12. Quang said

    Thanks a lot. It worked. ^^

  13. UCSC said

    hey guys its worked …thax a lot

  14. udara said

    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?

    • 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)

    • Anubhav said

      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

  15. Pradeek said

    You can find these in the devel package instead of manually searching.

  16. Cris said

    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 🙂

  17. jOBr said

    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

  18. Milos Grcic said

    thnx mate! it works to me 🙂

  19. Fata1Diabl0 said

    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!

  20. mizbase said

    Thanks buddy,
    really helped, i think netbean should link your page,
    the help page sucks, regarding the instruction they have given
    thanks a lot

  21. satish said

    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/ 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?

    • 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.

  22. joer86 said

    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.

  23. Sue said

    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?

  24. Eugene Kovalev said

    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:

    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/ 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/ 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)

  25. BigBwana said

    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?

  26. BigBwana said

    Ok, I think I figured it out – forgot to select the compilers in the dev package – Kinda thought they would be there by default.

  27. Kotushka said

    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.

    • Chandan said

      please give me brief information how to configure cygwin in netbeans 6.9 with versions and step by step

      i am installed mingw netbeans automatically detected only gcc,g++,g77,as
      it doesn’t finds make file,qmake,cmake,gdb please help me

  28. KJB said

    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.

  29. QZip said

    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).

    • 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.

  30. Ricky said

    Thank you a lot, this was so helpful for me.


  31. Bruce said

    Wow, thanks! That was extremely helpful.

  32. Maru said

    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 =)

  33. Arpit said


    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/ -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 😦

    • 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.

    • Arpit said

      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?

      • 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?

        • Arpit said

          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..

  34. tom said

    Worked very nicely. Thank you very much Roy.

  35. BA said

    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 .

  36. Nate said

    Did my best to follow your instructions, still getting this error when I try to build:

    /usr/bin/make -f nbproject/ SUBPROJECTS= .build-conf
    make[1]: Entering directory `/cygdrive/c/Users/Nathan/Documents/NetBeansProjects/HelloWorldNative’
    /usr/bin/make -f nbproject/ 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!

  37. Arpit said

    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!!

  38. Koen said

    Quite a neat site you have here, Royal! Not sure what it’s all about though.

  39. dan said

    Thank you very much for your effort.
    I’m from Romania.

    A good day to you.

  40. khosi said

    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.

  41. Joey said

    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

  42. Arjita said

    This is awesome! I spent so much time trying to figure this out…until I found this post.
    Really helpful and clear. Thanks 🙂

  43. JKirk said

    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.

  44. Vencat said

    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.

  45. kibre said

    building is successful but it won’t run…. The system cannot find the path specifiedProcess is started in an external terminal …

    this message appears… any idea ,

  46. The Weba said

    Thanks so much!!! ^_^

  47. Sonal said

    Followed all instructions as above, but still stuck up with this error 😦
    Can you please help..
    CLEAN SUCCESSFUL (total time: 200ms)

    nbproject/ No such file or directory
    make: /bin/sh: Command not found
    make: *** [.depcheck-impl] Error 127
    BUILD FAILED (exit value 2, total time: 187ms)

  48. CodenameA said

    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:


  49. ml said

    hey thank you so much, i was about to crash my computer because of compiler problem, you saved my homework!

  50. dwi said

    I have installed cygwin successfully and set the path. But I dont see Netbeans in anywhere. Please help!

  51. Irfan said

    Hey Bro
    I tried to download cygwin but I couldn’t find mirrors. U gave a link does not working says forbidden.. something. if u have any alternatives Please share with me I will be very thankful.

  52. Aravind said

    Hi, I did everything you said, still there’s some problem. There’s no C:\Cygwin\bin\gdb.exe available. I mean, the gdb.exe is missing. and also, even after to setting the PATH variable to C:\cygwin\bin netbeans IDE says {unable to configure C compiler: C:\Cygwin\bin\gcc.exe, set PATH variable to C compiler: “C:\Cygwin\bin\gdb.exe” and restart IDE again.} I did but it says the same thing again. Then I changed C compiler to: “C:\Cygwin\bin\gcc-3.exe”, the problem got resolved. After all this, my project is unable to build. Its says “Build Failed”. Please help me.

  53. Lord Skass said

    Hi! Thank you so much!

    I have already installed correctly NetBeans 6.8 and Cygwin!

    I have a problem: when the compiler works there is this error

    “Impossibile open the file:”

    I’m Windows Vista user but the exstension “.sh” is used in Linux OS
    (I’ve downloaded the Microsoft Version and I don’t know what must I do…)

    (Sorry but I’m from Italy, I hope you’ll undestand)

  54. Leopard said

    I installed cygwin successfully but when i run my program in netbeans , i got the following error:

    Running “F:\Program Files\Cygwin\cygwin-b20\H-i586-cygwin32\bin\make.exe -f Makefile CONF=Debug” in E:\j programs\Java Project\nbproject\CTester

    ! was unexpected at this time.

    make.exe”: *** [.validate-impl] Error 1

    Build failed. Exit value 2.

    I will be thankful if you help me.

  55. joey said


    I have done all of your advices and when I started to compile a programme I got an error
    Process is started in an external terminal …

    before the programme will be finished

  56. John said


    First of all thanks a lot for your helpfull tutorial on installing c/c++ on netbeans.
    I got a lot further with your description than with the one offered on netbeans. I still encounter a tiny problem though.

    Whenever I try to run an app I get the following error statement:

    which: no pkg-config in (/usr/bin:/cygdrive/c/WINDOWS/System32)
    make: pkg-config: Command not found
    make: *** [.build-pre] Error 127

    I tried to find out what is the problem with pkg config but I was unable to figure it out. Also checked if my path variables were set correctly and everything was okay.

    So maybe you could help with this problem.

    thanks a lot


    BUILD FAILED (exit value 2, total time: 172ms)

  57. taz said

    Thanks, that works perfect.

  58. […] as if it doesn't have the needed libraries.I tried following this guide, but it didn't sort it out: c/c++ compiler for NetBeans 6.5 (under Windows) Here's screenshots of my settings: ImageShack Album – 3 images Can anyone please help me get my […]

  59. Sashi said

    Can someone help please???

    I did everything but cannot compile C++ programs but I could compile C programs. This is what get compiling C++ programs

    /usr/bin/make -f nbproject/ SUBPROJECTS= .build-conf
    make[1]: Entering directory `/cygdrive/c/Users/sashi/Documents/NetBeansProjects/HelloQtWorld_1′
    VPATH=. -o nbproject/
    /bin/sh: -o: command not found
    make[1]: *** [nbproject/] Error 127
    make[1]: Leaving directory `/cygdrive/c/Users/sashi/Documents/NetBeansProjects/HelloQtWorld_1′
    make: *** [.build-impl] Error 2
    BUILD FAILED (exit value 2, total time: 967ms)

    • It looks like you are using the c compiler for C++. Be sure to check your compiler settings in Nebeans and that the C++ compiler is called g++.exe

      • Sashi said

        Under options I do have C++ compiler as C:\cygwin\bin\g++.exe . I dont know what is wrong.
        I have the path name (under environmental variable) as
        %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\CyberLink\Power2Go
        I didn’t even add C:\cygwin\bin

  60. Sashi said

    Under options I do have C++ compiler as C:\cygwin\bin\g++.exe . I dont know what is wrong.
    I have the path name (under environmental variable) as
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\CyberLink\Power2Go
    I didn’t even add C:\cygwin\bin

  61. rodanmuro said

    Hey man thanks a lot. I had that problem but now you resolve it. Thanks again.

  62. lalit samar said

    Running “make.exe -f Makefile CONF=Debug clean” in C:\Documents and Settings\India\My Documents\NetBeansProjects\Nat

    To use Symbian OS tools without specifying a device name, a default

    device must be set using the devices -setdefault command.

    Clean failed. Exit value 2.

    how solve this error plz help me

  63. Gilmar said

    I need help on this erros while trying to execute a C++ file in netbeans using cygwin:

    It seens like the POSIX points to cygwin/c/Arquivos de programas… and I guess it should point to c:\Arquivos de programas…

    Any solution?

  64. Gilmar said

    I need help on this error while trying to execute a C++ file in netbeans using cygwin:

    It seens like the POSIX points to cygwin/c/Arquivos de programas… and I guess it should point to C:\Arquivos de programas…

    Any solution?

  65. BigSurf said

    Thanks a lot, now I can all my job do in same IDE!

  66. fsdfsd said

    u r the biggest fool on earth

  67. Whipfire said

    Thanks very much, Roy! Your instructions worked like a champ.

  68. Uli said

    Excellent guide, worked fine =)

  69. ik.w said

    excellent!! tnks

  70. Carl said

    many thanks, exactly what I was looking for as and Cygwin was unable to explain cygwin install

  71. M said

    Hey, thanks for great information, but I have a problem. I use NetBeans IDE 6.7.1 and on the options>c c++>build tools, I also have a “assembler” between fortran compiler and make command. it says assembler missing or invalid. any suggestion how to fix it?

  72. Michael Corleone said

    It worked with NetBeans 6.9 too!

    I cannot express how grateful I am.


  73. Wow and the comments are still dripping in. I’m very grateful for all the comments, but you should really place them here: all the updates are there :). (I cant think of a way to make that even more apparent :P, title should say enough).

    • Michael said

      Oops … maybe it’s because users just scroll down till they see something that looks like instructions 🙂 Maybe it’s because most of us are already stressed by the non-working instructions found on Netbeans. Impatiently looking for a solution people wont spent time reading lead-ins, hints etc. They just want to know what to do.

  74. Chibu Jax said

    This is great,not everyone can share their effort

  75. KRISH said

    I am using cygwin 2.697 & netbeans6.9
    I came to now that this cygwin is a major release.
    Above instructions are not working.
    Please help me if you can find out anything…

  76. rahul said

    i have this error Process is started in an external terminal …

    RUN FAILED (exit value 127, total time: 456ms)
    after running the welcome application in net beans

  77. jagbir singh said

    I have problem with make.exe in cygwin. i already add “C:\cygwin\bin\cyggcc_s-1.dll” in c compiler through tools/c/c++ in netbeans 6.8. but there is no make.exe in C:\cygwin\bin. please tell me how i can add make.exe or provide other command to add in make command in netbeans 6.8

    advance thanks
    jagbir singh

  78. jagbir singh said

    I have problem with make.exe in cygwin. i already add “C:\cygwin\bin\cyggcc_s-1.dll” in c compiler through tools/options/c/c++ in netbeans 6.8. but there is no make.exe in C:\cygwin\bin. please tell me how i can add make.exe or provide other command to add in make command in netbeans 6.8

    advance thanks
    jagbir singh

  79. Abebe Tedila said

    Hey, Thanks for ur support.
    I am using windows 7 32 bit, when I tried to Install cygwin the packages are not displayed. What are u suggest me to do?

    Thanks for ur help

    Abebe Tedila

  80. Dausayi said

    Hey Roy Triesscheijn you saved my day 6month after your post

  81. Oneil Drummond said


  82. Ram said

    Thanks a ton for this post ! Really saved the day 🙂

  83. Parag said

    Thank you, worked like a charm. I got stuck and this page helped me out.

  84. Matt said

    Thank you.
    These instructions were simple and straightforward. Worked like a charm!

  85. Thuthuka said


    I followed your instructions but when I run the c application it shows the following error:

    cygwin warning:
    MS-DOS style path detected: /usr/bin/C:\Program
    Preferred POSIX equivalent is: /usr/bin/C:/Program
    CYGWIN environment variable option “nodosfilewarning” turns off this warning.
    Consult the user’s guide for more details about POSIX paths:
    Can’t find C:\Program on PATH.

    BUILD FAILED (exit value 29, total time: 156ms)

    What may be wrong and how do I solve it?

  86. Habtom said

    Dear all, I was trying to use Cygwin for processing some netcdf file and my pc is 64 bite with windows 7 after I install cygwin and when I try to run some of *.exe that used for processing netcdf file i got the following message what should I have to do?
    ”the procedure entry point cygwin_create_path could not be located in the dynamic link library cygwin1.dll”
    Thank you in advance.

  87. Brian said

    Thank you. 😀

  88. priya said

    how to open .exe files in net beans??

  89. Michael said

    Thank you for sharing. I installed everything (at least I thought I did) the way it was described on Netbeans … after a while I found out there is something missing and a few Google moments later I found you tutorial here. You made me happy 🙂

  90. Dylan said

    Im using the latest Cygwin packages with Netbeans 6.9.1 and those includes are the one thing I couldn’t figure out.
    You saved me countless hours.
    Thanks again!

  91. sch said

    Thankyou for posting such helpful tutorial. I am using the latest Cygwin and Netbeans. With the help of this tutorial, I can debug the code but can’t run it. It says “Run failed”. Any ideas???

  92. Tomek said

    Thank you:)

  93. mik said

    CgyWin …linux delirium in windows machine!

    Thanks a lot for this intructions.

  94. Eralp said

    Thank you very much..!! It’s really clear to understand..The God save u bro.

  95. Felipe said

    Thanks man, it worked pretty great for me.
    Nice job.

  96. Jiego said

    Hey man!

    Thanks for this! I tried this with Netbeans 7.0 and it worked!
    Bookmarked this on my delicious page. 😀

  97. HI,
    Dear Admin, This is Manjunath Hiremath , I am so thankful to you for the article and info.
    But, I have downloaded the components from cygwin, but I have been trying to find the gcc, c++ exe file in bin folder, but they have not been downloaded , as they are not seen,,, how to download them exclusively please let me know.
    Waiting for your Reply,

  98. Hemant Kumar said

    plz tell me to add system files(.dll in windows) in my java projects

  99. hi , i cant able to find cygwin compiler is installed or not , pl tell me how to find,,,,,,,,,,,,,,,

  100. vj said

    Hey, thanks a lot for the instructions. Life saver.


  101. Famim said

    Hey Roy,
    I am having a installing netbeans and the c++ compiler. Your instructions were really helpful and I think I got most of it done, but for some reason when I try to run/debug I keep getting “No shell found. Cannot Proceed. Please install either CYGWIN or Msys.” I don’t know why that is happening because I already installed cygwin and set the base directory to C:\cygwin, c++ compiler to C:\cygwin\Bin\g++-3.exe, and make command to C:\cygwin\Bin\make.exe, and the debugger to C:\cygwin\Bin\gdb.exe. However, for some reason it says I need to get cygwin. Please Help.

  102. Anp said

    Thanks…….. at last it works…….

  103. kashyap said

    THank you my friend!!!

  104. my said

    Thanks. Your article really helped me.


  105. Ahmad Hassan said

    I have successfully run program in net bean in window 7 but it is showing result at the bottom of the net bean. I wanted that it show the result on the terminal like it shows in UBUNTU. Please help me.

  106. thanks . this really work :). i have tried everything but now it work

  107. Hey everyone,

    It’s amazing that you all keep posting here, but I’ve moved to 3 years ago :). I’ll try checking up here on questions but it might be some time between answers. So move to the new blog :).

    • rahul said

      hey roy i got this error when i built c code in netbeans C:\Users\rahul\Documents\NetBeansProjects\Welcome_2\dist\Debug\Cygwin-Windows\welcome_2 “arg 1” “arg 2” “arg 3” “arg 4” i dnt understnd what is that problem

  108. Jorge said

    Thank you very much for this tutorial. Last year I spent quite a few hours trying to configure netbeans to work as a C++ IDE without success. I also downloaded everything from the cygwin website as you did your first time… I dont know why I didnt stumble upon your blog last time, but thanks again for posting this info! Very useful!

    Greetings from Costa Rica.

  109. Uma said

    this was so helpful….bang on …..instruction by instruction…perfectly works!

  110. Macke said

    I have to follow these many replies. thx 4 that existing blog. It still works with Netbeans 7.1.2 and Windows 7!!

  111. Great article. I am facing a few of these issues as well.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: