2014-07-08 83 views
0

我使用GLFW的预编译版本的Windows。我使用netbeans,我无法解决这个错误。GLFW无法编译示例netbeans mingw w64

"/E/Develop/Util/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf 
    make.exe[1]: Entering directory `/e/Develop/Project/Netbeans/C++/CppApplication_1' 
    "/E/Develop/Util/msys/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-w64_x64_-posix-seh-Windows/cppapplication_1.exe 
    make.exe[2]: Entering directory `/e/Develop/Project/Netbeans/C++/CppApplication_1' 
    mkdir -p build/Debug/MinGW-w64_x64_-posix-seh-Windows 
    rm -f "build/Debug/MinGW-w64_x64_-posix-seh-Windows/main.o.d" 
    g++ -c -g -I/E/Develop/Library/C++/GLFW\ 3.0.4/include -MMD -MP -MF "build/Debug/MinGW-w64_x64_-posix-seh-Windows/main.o.d" -o build/Debug/MinGW-w64_x64_-posix-seh-Windows/main.o main.cpp 
    mkdir -p dist/Debug/MinGW-w64_x64_-posix-seh-Windows 
    g++  -o dist/Debug/MinGW-w64_x64_-posix-seh-Windows/cppapplication_1 build/Debug/MinGW-w64_x64_-posix-seh-Windows/main.o -L../../../../Library/C++/GLFW\ 3.0.4/lib-mingw -L../../../../Compiler/C++/MinGW-w64\(x64\)-posix-seh/x86_64-w64-mingw32/lib -lglfw3 -lglfw3dll 
    e:/Develop/Compiler/C++/MinGW-w64(x64)-posix-seh/bin/../lib/gcc/x86_64-w64-mingw32/4.9.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lglfw3dll 
    collect2.exe: error: ld returned 1 exit status 
    make.exe[2]: *** [dist/Debug/MinGW-w64_x64_-posix-seh-Windows/cppapplication_1.exe] Error 1 
    make.exe[2]: Leaving directory `/e/Develop/Project/Netbeans/C++/CppApplication_1' 
    make.exe[1]: *** [.build-conf] Error 2 
    make.exe[1]: Leaving directory `/e/Develop/Project/Netbeans/C++/CppApplication_1' make.exe": *** [.build-impl] Error 2 

我添加的目录和链接图书馆像this

this is the code

我怎样才能解决这一问题?

+0

“-L ../../../../ Library/C++/GLFW \ 3.0.4/lib-mingw” - 反斜杠看起来可疑后的额外空间 – HEKTO

+0

@HEKTO相对路径,与绝对相同的问题路径 – Keltere

+0

我认为g ++不喜欢嵌入空格的路径。如果没有这个“GLFW 3.0.4”dirname,你能重新安装GLFW吗?像“GLFW_3.0.4”或类似? – HEKTO

回答

0

GLFW有两个版本的库 - 静态和动态(DLL)。如果要与静态库链接,则不必将glfw3dll(这是一个DLL 链接库)包括到库列表中。请参阅Building programs that use GLFW了解更多信息。他们还提到了其他需要链接的库。