markfaction / VSCode-CPlusGLFW

A VS Code reference workspace for developing OpenGL applications using the GLFW library
21 stars 2 forks source link

I still can't import glfw3.h after following your guide and cloning your repo #1

Open KaTaiHo opened 5 years ago

KaTaiHo commented 5 years ago

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!

KaTaiHo commented 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 toglfwCreateWindow' 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 toglfwMakeContextCurrent' 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 toglfwSwapBuffers' 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 toglfwTerminate' collect2.exe: error: ld returned 1 exit status

Squidyman commented 4 years ago

I have the same issue as KaTaiHo

wimanshaherath commented 3 years ago

Make sure the steps below are correct.

trollVesting commented 3 years ago

I have the same issue as KaTaiHo

VictorG-028 commented 2 years ago

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 .