views:

62

answers:

1

In NetBeans 6.9 in windows version I use CygWin for C++ programming.I can compile my simple program and BUILD SUCCESSFUL message show by output window in NetBeans but when run my project this message show in external terminal :

/cygdrive/c/Users/SjB/Documents/NetBeansProjects/CppApplication_3/dist/Debug/Cyg
win-Windows/cppapplication_3.exe: error while loading shared libraries: ?: canno
t open shared object file: No such file or directory
Press [Enter] to close the terminal ...

after that I go manually to this folder (/cygdrive/c/Users/SjB/Documents/NetBeansProjects/CppApplication_3/dist/Debug/Cygwin-Windows/) and run it manually (./cppapplication_3.exe) and work !

what should I do to run it in NetBeans IDE ???!!!

+1  A: 

You should add the environment variable to your path.

Go to Control Panel -> Systems-> Advanced -> Environment variables and edit the $PATH variable by adding C:\cygwin\bin

Then, reload your project in NetBeans and it should work.

Serdar

Serdar Kadioglu