[Using Mac and VSCode] So I am running OpenGL through GLEW and GLFW and when I just run it:
g++ -framework OpenGL $$(pkg-config --cflags --libs glfw3) $$(pkg-config --cflags --libs glew) ./src/main.cpp --std=c++20 -o ./src/main && ./src/main
It works fine however when I try debugging it gives some weird errors.
Here are my args in tasks.json file:
"args": [
"-std=c++20",
"-framework OpenGL"
"-I/opt/homebrew/Cellar/glfw/3.4/include -L/opt/homebrew/Cellar/glfw/3.4/lib -lglfw",
"-I/opt/homebrew/Cellar/glew/2.2.0_1/include -L/opt/homebrew/Cellar/glew/2.2.0_1/lib -lGLEW",
"-fcolor-diagnostics",
"-fansi-escape-codes",
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
]
Tasks.json doesn’t understand the -framework OpenGL section, however it runs okay without debug mode. Also it can not find my libs glfw and glew for some reason. Could you tell me where I did something wrong, because I cannot understand what is going on here with debugging in VSCode.