繁体   English   中英

在Window中的NetBeans上设置OpenGL

[英]Setting up OpenGL on NetBeans in Window

我正在尝试在Netbeans 8.1中设置OpenGL。 我已经将MinGW安装为C ++编译器,并且可以正常工作。

我想使用GLEWGLFW库,所以我已经下载了它们,并创建了一个include文件夹,其中存储了所有.h文件,还有一个libs文件夹,其中存储了glew32.libglfw3.lib 我通过设置将NetBeans中的include文件夹包括在内

项目属性>构建> C ++编译器>包含目录

并且我通过设置将Net文件夹中的bin文件夹包括在内

项目属性>构建>链接器>库

然后在我的main.cpp文件中插入了GLEW和GLFW的include,但是当我执行mi文件时,这让我得到了这个输出错误

cd 'D:\Documenti\NetBeansProjects\Test'
C:\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Debug
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/d/Documenti/NetBeansProjects/Test'
"/C/MinGW/msys/1.0/bin/make.exe"  -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/test.exe
make.exe[2]: Entering directory `/d/Documenti/NetBeansProjects/Test'
mkdir -p dist/Debug/MinGW-Windows
g++     -o dist/Debug/MinGW-Windows/test build/Debug/MinGW-Windows/main.o -l glew32 -lglfw3
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lglew32
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -lglfw3
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/test.exe] Error 1
make.exe[2]: Leaving directory `/d/Documenti/NetBeansProjects/Test'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/d/Documenti/NetBeansProjects/Test'
make.exe": *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 1s)

有谁知道如何解决这个问题?

链接器找不到您的库,因为您没有告诉NetBeans存储它们的目录。 请前往:

Project Properties -> Linker -> Additional Library Directories

并将此目录添加到您的NetBeans项目。 之后,在编译/链接时,您将看到附加的链接器选项-L<path>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM