์ผ๋ถ C ์ฝ๋๋ฅผ ์์ฑํฉ๋๋ค. ์ฝ๋๋ฅผ ์คํํ๋ ค๋ฉด ํ์ผ์ ์ปดํ์ผํ๊ฑฐ๋ ํ๋ก์ ํธ๋ฅผ ๋ง๋ค์ด์ผ ํฉ๋๋ค.
๊ทธ๋์ ์ ๋ tasks.json์ ์์ฑํฉ๋๋ค. ๊ทธ๋ฌ๋ task.json์ ์ฌ์ฉํ๊ณ ์ฝ๋ ๋ฌ๋๋ฅผ ์ํ settings.json์์ ์ด๋ฌํ extendsOn ์์
์ ์ค์ ํ๋ ๋ฐฉ๋ฒ์ ๋ฌด์์
๋๊น?
{"label": "VC_Compile",
"๊ทธ๋ฃน": "๋น๋", "์ฐฝ": {"๋ช ๋ น": "ํธ์ถ",
"์ธ์": ["\"C:/ํ๋ก๊ทธ๋จ ํ์ผ(x86)/Microsoft Visual C++ ๋น๋ ๋๊ตฌ/vcbuildtools.bat\"", "X86", "&& cd /d ${workspaceRoot}",
"&& cl /W4 /EHsc /Ox /GL /source- charset:utf-8 /DNDEBUG /MT", "-IC:/Python3632/include",
"/Fd:out/ /Fo:out/ ${file}", "/link", "/ LIBPATH:C :/Python3632/libs / LIBPATH:C :/Python3632/PCbuild/win32",
"/ out:out/ ${fileBasenameNoExtension}.out"]},
"์ ํ": "์", "problemMatcher": ["$tsc"], "dependsOn": "clear_o_files",
"ํ๋ ์ ํ ์ด์ ": {"echo": true, "reveal": "ํญ์", "focus": false, "panel": "shared"}
},
์๋
ํ์ธ์ @Yensan , Code Runner๋ tasks.json๊ณผ ๊ด๋ จ์ด ์์ต๋๋ค. ํ์ํ ๊ฒ์ code-runner.executorMap
, https://github.com/formulahendry/vscode-code-runner#configuration ์ ์
๋ฐ์ดํธํ๋ ๊ฒ์
๋๋ค.
"code-runner.executorMap": {
"c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt && balabalala"
}
์๋
ํ์ธ์, @formulahendry , ๋ต๋ณ ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค. ์์์, ํ์ง๋ง ์ ๋ ๊ทธ๊ฒ๋ค์ ์ฐ๊ด์ํค๊ณ ์ถ์ต๋๋ค.
์ปดํ์ผ/๋น๋๊ฐ ๋ณต์กํ ์์
์ด๊ธฐ ๋๋ฌธ์ code-runner.executorMap
๋ก ์์ฑํ๋ ๊ฒ์ ๊ทธ๋ฆฌ ํธ๋ฆฌํ์ง ์์ต๋๋ค. ํ ์ค๋ก ์์ฑํด์ผ ํ๊ธฐ ๋๋ฌธ์
๋๋ค! :์์:
์ ๋ ์ด ๊ธฐ๋ฅ์ด ๊ถ๊ธํ๊ณ ์ ์ฉํ ๊ฒ ๊ฐ์ต๋๋ค.
VS์ ์์
API๋ฅผ ํธ์ถํ์ฌ ์ด๊ฒ์ด ์คํ๋ ์ ์๋ค๊ณ ์๊ฐํฉ๋๋ค. https://github.com/Microsoft/vscode/issues/45980 ?
์ด์ ๋ํ ์ข์ ํด๊ฒฐ์ฑ
์ settings.json์์ code
๋ช
๋ น์ ์ฌ์ฉํ์ฌ ์์
์ ์คํํ๋ ๊ฒ์ด์ง๋ง ์ฝ๋ ๋ช
๋ น์ด ์์
์ ์คํํ ์ ์๋ ๊ฒ์ฒ๋ผ ๋ณด์
๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
์๋ ํ์ธ์, @formulahendry , ๋ต๋ณ ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค. ์์์, ํ์ง๋ง ์ ๋ ๊ทธ๊ฒ๋ค์ ์ฐ๊ด์ํค๊ณ ์ถ์ต๋๋ค.
์ปดํ์ผ/๋น๋๊ฐ ๋ณต์กํ ์์ ์ด๊ธฐ ๋๋ฌธ์
code-runner.executorMap
๋ก ์์ฑํ๋ ๊ฒ์ ๊ทธ๋ฆฌ ํธ๋ฆฌํ์ง ์์ต๋๋ค. ํ ์ค๋ก ์์ฑํด์ผ ํ๊ธฐ ๋๋ฌธ์ ๋๋ค! :์์: