Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 98994

Code Runner using MSVC create a too long string

$
0
0

I use CodeRunner for VSCode on Windows, so I need to change g++ to MSVC (Visual C++ Compiler). So I configure settings.json for coderunner:

{
    "window.zoomLevel": 0,
    "code-runner.runInTerminal": true,
    "terminal.integrated.shell.windows": "cmd.exe",
    "code-runner.executorMap": {
        "cpp": "vcvars64.bat && cl.exe $fileName && del $fileNameWithoutExt.obj && cls && $fileNameWithoutExt.exe",
    },
    "files.autoSave": "afterDelay"
}

As you can see, I add path of vcvars64.bat to system PATH. It works, but after several runs I get next error:

Input line is too long.

I search for it and found that it is because CodeRunner run vcvars64.bat every time! So after several runs total path become too long:

"Input line is too long" error in BAT File

Restarting console clear it, but after several runs falls again.

Looks like I need to find some way to use vcvars64.bat only once but I don't know how!


Viewing all articles
Browse latest Browse all 98994

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>