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

VS Code Code Runner C++ with wrong command in terminal

$
0
0

I'm using Code Runner extension in VS Code to run C++ code and it's using the wrong terminal command to do so. I'm using git-bash in VS Code and Windows 10.

This is the command in terminal:

Douglas@LAPTOP-6BSNLLDB MINGW64 /c/path (master)
$ cd "c:\path\"&& g++ HelloWorld.cpp -o HelloWorld && "c:\path\"HelloWorld
bash: cd: c:\path"&& g++ HelloWorld.cpp -o HelloWorld && c:path"HelloWorld: No such file or directory

As you can see, it's using cd and g++ correctly, but the command to actually run the .exe file is wrong. Shouldn't it be "c:\path\HellowWorld.exe"?

How can I change this? It works correctly with python.

If I can't, how do I run C++ code within VS Code?


Viewing all articles
Browse latest Browse all 99726

Trending Articles



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