GLFW 无法编译示例 netbeans mingw w64

GLFW Can't compile example netbeans mingw w64

本文关键字:netbeans mingw w64 编译 GLFW      更新时间:2023-10-16

我使用了windows的预编译版本的GLFW。我使用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

我添加目录并像这样链接库

这是代码

如何解决这个问题?

GLFW有两个版本的库-静态和动态(DLL)。如果您想链接到静态库,那么您不必将glfw3dll(它是一个DLL link库)包含到库列表中。有关更多信息,请参阅使用GLFW的建筑程序。他们还提到了你需要链接到的其他库。