I've been working on a C++/OpenGL Game in Visual Studio and wanted to move to VSCode(Windows 10). To start this off I tried to get the setup running with a simple "Hello World" and my Compiler(MinGW/g++) seems to work fine. But when trying to link my dependencies(glew32.dll and SDL2.dll) I get an error: cannot find -l<AbsolutPath>\glew32.dll
.
I'm not too familiar with VSCode and linking libraries, so I tried to link them dynamically (that seems to be easier) by adding the path of the .dll as argument in tasks.json
.
"args": [
"-fdiagnostics-color=always",
"-g",
"-std=c++11",
"${file}",
"-o", "${fileDirname}\\${fileBasenameNoExtension}.exe",
"-lmingw32",
"-lopengl32",
"-l${fileDirname}\\libs\\glew-2.1.0\\bin\\Release\\x64\\glew32.dll",
"-l${fileDirname}\\libs\\SDL2-2.0.14\\lib\\x64\\SDL2.dll",
]
I have no real clue how to tackle this Problem... (a while ago I tried the same with CLion, but failed at the same Error) Has anybody an Idea what I could do to get rid of the Error?
Is something wrong with the Path ${fileDirname}\\libs\\glew-2.1.0\\bin\\Release\\x64\\glew32.dll
?
Should I use .lib instead of the .dll?
I've read one might add the libraries to the include directory of my compiler. Is this necessary?