VS Code will not build c++ programs with multiple .ccp source files

前端 未结 7 1982
后悔当初
后悔当初 2020-11-29 07:58

Note that I\'m using VS Code on Ubuntu 17.10 and using the GCC Compiler.

I\'m having trouble building a simple program which makes use of additional .ccp files. I\'m

7条回答
  •  感动是毒
    2020-11-29 08:12

    in tasks.json:

            "label": "g++.exe build active file",
            "args": [
                "-g",
                "${fileDirname}\\**.cpp",
                //"${fileDirname}\\**.h",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe",
            ],
    

    in launch.json:

    "preLaunchTask": "g++.exe build active file"
    

    it will work if your sources are in separated folder

提交回复
热议问题