-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on c/cpp file, while right click the "run code", errors would occur on windows #41
Comments
Thanks @lsmale for reporting it, I will fix it for Windows. |
Hi @lsmale , this issue has been fixed. Please install the latest version and have a try. |
Hi @formulahendry , I tried it and I find you used command "cd $dir", and I test it with the file in different drive, it turns out the command cannot cross drive and while in different drive it may result in "g++: error: name.cpp: No such file or directory“. |
HI @lsmale , the current working directory would be the root folder that you open in VS Code. Thus, the drive of current working directory should be same as that of the cpp file. So are you opening a file from another drive in VS Code? To Fix this, there are two options, refer to https://github.com/formulahendry/vscode-code-runner#about-cwd-setting-current-working-directory:
|
Or, you could replace |
Hi @formulahendry , I get it! Thanks. |
The default "code-runner.executorMap" of "c": "gcc $fullFileName && ./a.out" and "cpp": "g++ $fullFileName && ./a.out", but in pc the default output file name is "a.exe", and exec method should be "a.exe" or "a".
The text was updated successfully, but these errors were encountered: