How to correctly configure netbeans 6.7 and c++ on windows?

11,824

Solution 1

I had problems getting Netbeans 6.7.1/C++/MinGW working too. I don't know if this will help but I thought I'd describe my experience anyway.

I was having successful builds but Netbeans was unable to launch my executable. I was able to verify that the executable was being built and I could run it from an external command prompt. I was also unable to open the properties on my project.

After a day of searching the net, I found a tidbit of info that lead to the solution.

Basically, it all boiled down to not having the path to my build tools set in the windows environment path. After I set the path environment variable, I cleared all the Netbeans configuration so I could be sure about setting things up from scratch. You can do this by deleting the .netbeans folder in your user directory in c:/Documents and Settings.

That should all be done with Netbeans closed of course. Afterwards, start it up and setup your build configuration before you create any projects or load existing projects. Go to Tools/Options/C++ and point it at the build tools directory you added to your environment path (c:/MinGW/bin and c:/msys/1.0/bin) and the individual tools as required.

I have my msys stuff in the same directory as the MinGW stuff. As an extra precaution, you may want to make sure there are no same named programs in both bin directories that may cause grief.

I seem to have a C++ development environment now that I'm quite pleased with as I can use it in Windows and Linux. Hope something in there helps.

Solution 2

Can you check on the "project options" on your picture and look if the default platform is windows ?

Have installed netbeans on both linux and windows machines and it's strange that it didn't work "straight out of the box" after following the instructions..

You did double check everything right? As it seems that path variable isn't setup correctly in your environment.

The picture also says that the debugger is missing/invalid.. Did you follow these 16 steps (step 14 for installing debugger) or did you use something else?

Last but not least, your "error" message says that the build was successful. Where did you look for the .exe ? It should be under

dist/<Configuration>/<ToolChain>/

Share:
11,824
grigoryvp
Author by

grigoryvp

professional software developer

Updated on June 09, 2022

Comments

  • grigoryvp
    grigoryvp about 2 years

    I have installed and configured NetBeans 6.7 for c++ according to the official manual: http://www.netbeans.org/community/releases/67/cpp-setup-instructions.html#mingw

    Configuration window looks like this: netbeans config

    Unfortunately, at 'compile' command following line is displayed:

    /usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf BUILD SUCCESSFUL (total time: 642ms)

    Since i'm on windows and it's no /usr/bin/make, no executable is compiled :(. How to correctly configure NetBeans so it will use make from it's config, not from /usr/bin?

    Updated

    Problem is only with mingw/msys toolchain. It works OK with cygwin (same /usr/bin/make message is displayed, but executable IS created). So the question can be changed to: Can Netbeans 6.7 work with mingw on Windows, or i'm limited to cygwin?

  • grigoryvp
    grigoryvp almost 15 years
    No 'dist' folder is created. All paths are set. I have no problem using netbeans on macos or ubuntu. But on Windows it was always pain, but now it's not working for no reason :(
  • Milan
    Milan almost 15 years
    Must have confused default platform option with older netbeans versions. Try setting the path variables again. If that doesn't work, then you need to document each step, what you did, and post on netbeans forums it seems if noone else here can contribute with ideas :(