{// See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format"version":"2.0.0","tasks":[{"type":"shell","label":"clang++ build active file","command":"/usr/bin/clang++","args":["-std=c++17","-stdlib=libc++","-fPIC",//头文件所在目录"-I${workspaceFolder}/include","-I${workspaceFolder}/src",//静态库的在目录"-L${workspaceFolder}/lib",//具体的静态库名称"-l","GLEW","-l","glfw3",//cocoa framwork"-framework","OpenGL","-framework","Cocoa","-framework","IOKit","-framework","CoreVideo",//源代码目录"-g","${workspaceFolder}/src/util/*.cpp","${workspaceFolder}/src/gl/*.cpp","${workspaceFolder}/src/*.cpp",//编译后的输出目录"-o","${workspaceFolder}/bin/LEngine",],"options":{"cwd":"/usr/bin"},"problemMatcher":["$gcc"],"group":"build"}]}
launch.json 主要是用来调试用
{"version":"0.2.0","configurations":[{"name":"clang++ - Build and debug active file","type":"cppdbg","request":"launch","program":"${workspaceFolder}/bin/LEngine","args":[],"stopAtEntry":false,"cwd":"${workspaceFolder}/bin",//切换到哪个目录运行"environment":[],"externalConsole":false,"MIMode":"lldb","preLaunchTask":"clang++ build active file"}]}