简体   繁体   中英

GLFW Can't compile example netbeans mingw w64

I used the precompiled version of GLFW for windows. I use netbeans and i can't resolve this error.

    "/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). 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. Please see the Building programs that use GLFW for more info. They also mention other libraries you need to link to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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