Jumped ship from VS to VS Code, and although I prefer the editor, I’m having a lot of issues linking libraries. I do manage to link multiple source files, but not actual static libraries. The error I am getting is this:
C:/msys64/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/11.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: C:\Users\jonas\AppData\Local\Temp\ccEJvxZJ.o:C:\Users\jonas\Documents\Koding\Workspaces\multiFileTest/main.cpp:11: undefined reference to `glfwInit’
tldr; underfined reference to ‘glfwInit’;
This happens on the glfwTerminate() as well.
My tasks.json looks like this:
tasks - Pastebin.com
My actual source file looks like this:
source - Pastebin.com
and my folder structure is non-existant. I have simply copied all dependencies into the same folder as the source code. The gameStuff.cpp and header file is just a test to make sure I got linking a source file working, and it does, so just ignore that. I have included the last four dependencies in the tasks.json as I see a lot of people do it, but I’m not exactly sure where those are coming from.
I tried switching to glfw 64 bit, but just got more warnings. I’m not sure what I’m doing wrong here. Let me know if there is any additional information you would like to resolve this. Seems like many other people are facing the same issue, it is such a shame that no one has gotten any proper solutions yet.