NetBeans6.9 C++运行时错误
在 Windows 版本的 NetBeans 6.9 中,我使用 CygWin 进行 C++ 编程。我可以编译我的简单程序并通过 NetBeans 中的输出窗口显示构建成功消息,但是当运行我的项目时,此消息显示在外部终端中:
/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 ...
之后我手动转到此文件夹( /cygdrive/c/Users/SjB/Documents/NetBeansProjects/CppApplication_3/dist/Debug/Cygwin-Windows/) 并手动运行它 (./cppapplication_3.exe) 并工作!
我应该怎么做才能在 NetBeans IDE 中运行它???!!!
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 ???!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该将环境变量添加到您的路径中。
进入控制面板->系统->高级->环境变量并通过添加 C:\cygwin\bin 来编辑 $PATH 变量
然后,在 NetBeans 中重新加载您的项目,它应该可以工作。
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.