简体   繁体   English

GLFW无法编译示例NetBeans Mingw W64

[英]GLFW Can't compile example netbeans mingw w64

I used the precompiled version of GLFW for windows. 我为Windows使用了GLFW的预编译版本。 I use netbeans and i can't resolve this error. 我使用netbeans,但无法解决此错误。

    "/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

i add the directory and linked the Libraries like this 我添加目录并像这样链接库

this is the code 这是代码

how can i fix this? 我怎样才能解决这个问题?

The GLFW has two versions of libraries - static and dynamic (DLL). GLFW有两个版本的库-静态和动态(DLL)。 If you want to link with the static library, then you won't have to include the glfw3dll (which is a DLL link library) into the list of libraries. 如果要链接静态库,则不必在目录列表中包含glfw3dll (这是DLL 链接库)。 Please see the Building programs that use GLFW for more info. 有关更多信息请参见使用GLFWBuilding程序 They also mention other libraries you need to link to. 他们还提到了您需要链接到的其他库。

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

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