I get error "No such file or directory" when I compile C code using gitbash as terminal
See original GitHub issueHere is the output info:
$ cd "d:\VscodeProject\C\demo\" && gcc file1.c -o file1 && "d:\VscodeProject\C\demo\"file1
bash: cd: d:\VscodeProject\C\demo" && gcc file1.c -o file1 && d:VscodeProjectCdemo"file1: No such file or directory
How can I fix it?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
VSCode: Code Runner extension is unable to execute the ...
I am trying to run a simple program "primeRange.cpp" using Code Runner extension available for VSCode. I have selected my default terminal as ......
Read more >Terminal Shell Integration in Visual Studio Code
Visual Studio Code's embedded terminal can integrate with some shells to enhance the ... Run code ~/.bashrc in Git Bash to open the...
Read more >Copy your Git repository and add files | Bitbucket Cloud
Open a browser and a terminal window from your desktop. After opening the terminal window, do the following: Navigate to your home directory....
Read more >Get started using Git on WSL - Windows - Microsoft Learn
Learn how to set up Git for version control on the Windows Subsystem for Linux, along with Git Credential Manager.
Read more >Fix Error: GCC/G++ No such file or directory - YouTube
How to fix error GCC/G++ No such file or directory - fatal error ... How to Fix Include Path Error in C /C++...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What’s the path of your Git Bash? Could you set
"code-runner.terminalRoot": "/"
, and try again?Guys I was trying to execute C programme for last 3 days but didn’t get the answer but today I worked hard and finally it worked for me.
Please try this for C programme “c”: “gcc $fileNameWithoutExt.c -o $fileNameWithoutExt && ./$fileNameWithoutExt.exe”
for cpp “c”: “g++ $fileNameWithoutExt.c -o $fileNameWithoutExt && ./$fileNameWithoutExt.exe”