1
我試圖在Netbeans 8.1中設置OpenGL。我已經安裝了MinGW作爲C++編譯器,它的工作原理。在NetBeans窗口中設置OpenGL
我想用GLEW和GLFW庫,所以我已經下載了他們,我已經創建,我在儲存了所有.h文件一個包含文件夾,並在那裏我已經存儲了glew32.lib一個libs文件夾和glfw3.lib。我已經包含在NetBeans中包括文件夾設置
項目屬性>生成> C++編譯器>包含目錄
,我已經通過設置
的 斌文件夾包含在NetBeans項目屬性>構建>連接器>庫
然後在我的main.c PP文件我已經插入了包括GLEW和GLFW,但是當我執行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)
有誰知道如何解決這個問題?
謝謝,它的工作原理。我無法評價你的答案,因爲我的聲望很低 –
@AndreaFino - 很高興聽到! – HEKTO