question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

path error on code runner extension for C/C++

See original GitHub issue

code-server version: 0.2 alpha OS Version: Mac 10.14.3

Description

When I’d installed the extensions C/C++ and Code Runner, and ran the C++ code with Code Runner, an error /bin/sh 1:g++: not found was raised. However, when I copied the command cd "/projects/cppTest/" && g++ core.cpp -o core && "/projects/cppTest/"core to the terminal and ran it, it worked.

Steps to Reproduce

  1. Install the Extensions C/C++ v0.21.0 and Code Runner v0.9.7
  2. New Project and create a simple cpp file with a main function
  3. Click the > button provided by the Code Runner
  4. An error shown in the output-code window as follows:
[Running] cd "/projects/cppTest/" && g++ core.cpp -o core && "/projects/cppTest/"core
/bin/sh: 1: g++: not found
[Done] exited with code=127 in 0.044 seconds
  1. Copy the command cd "/projects/cppTest/" && g++ core.cpp -o core && "/projects/cppTest/"core to the terminal window and run it, and everything is OK

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
JayGhughriwalacommented, Mar 30, 2021

Yeah

1reaction
jsjoeiocommented, Mar 29, 2021

Hi @JayGhughriwala can you please open a separate issue (reference this issue) and we can look into it? Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Include Path Error in C/C++ Files using ... - YouTube
How to fix vscode error : #include errors detected. ... How to Fix Include Path Error in C/C++ Files using Visual Studio Code....
Read more >
C/C++: Can't compile or run when source file path has space(s ...
I created a file D:\Program\USACO\[C2, S3.2] Magic Square.cpp But when I compile, some errors occurred: [Running] cd "d:\Program\USACO\" ...
Read more >
python - Why is VS Code showing the path to the extension ...
Because the VS Code terminal integrates the powershell or cmd terminal from the computer, it need to specify the Python path to use...
Read more >
VSCode C/C++ Runner - Visual Studio Marketplace
Extension for Visual Studio Code - Compile, run and debug single or multiple C/C++ files with ease.
Read more >
How to compile your C++ code in Visual Studio Code
Edit your PATH environment variable to include the directory where the C++ compiler is located ... After installing MinGW, it can be found...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found