gcc, g++로 컴파일로 c/c++파일을 컴파일 할 때 터미널에 다음과 같이 입력해야한다.
g++ main.cpp -o main.exe
여기서 여러 소스코드 파일을 컴파일 하고 싶으면 다음과 같이 입력한다.
g++ ex1.cpp ex2.cpp -o main.exe
기존의 task.json파일은 다음과 같이 되어있을 것이다.
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\\\${fileBasenameNoExtension}.exe",
]
다음과 같이 컴파일할 파일을 넣어서 수정해준다.
"args": [
"-g",
"${fileDirname}/ex.cpp",
"${fileDirname}/ex2.cpp",
"-o",
"${fileDirname}\\\\${fileBasenameNoExtension}.exe",
],
추후에 리눅스를 배우며 작성하자.