Open KaTaiHo opened 5 years ago
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: main.o:main.cpp:(.text+0x61): undefined reference to glfwInit' c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: main.o:main.cpp:(.text+0xa0): undefined reference to
glfwCreateWindow'
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: main.o:main.cpp:(.text+0xae): undefined reference to glfwTerminate' c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: main.o:main.cpp:(.text+0xc0): undefined reference to
glfwMakeContextCurrent'
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: main.o:main.cpp:(.text+0xcb): undefined reference to glfwWindowShouldClose' c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: main.o:main.cpp:(.text+0xf0): undefined reference to
glfwSwapBuffers'
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: main.o:main.cpp:(.text+0xf5): undefined reference to glfwPollEvents' c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: main.o:main.cpp:(.text+0xfc): undefined reference to
glfwTerminate'
collect2.exe: error: ld returned 1 exit status
I have the same issue as KaTaiHo
Make sure the steps below are correct.
I have the same issue as KaTaiHo
I've had this issue too, but was able to solve it by copying the directory GLFW instead of the .h files.
In my case, this directory was inside glfw-3.3.6.bin.WIN64\include and contains the .h files inside of it.
I thought of doing this because the include was <GLFW/glfw3.h> instead of
My c_cpp_properties.json looks like this.
{ "configurations": [ { "name": "Win32", "includePath": [ "${workspaceFolder}/**", "C:/MinGW/include" ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "windowsSdkVersion": "10.0.17134.0", "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/bin/Hostx64/x64/cl.exe", "cStandard": "c11", "cppStandard": "c++17", "intelliSenseMode": "msvc-x64" } ], "version": 4 }
Any help would be much appreciated!