Comments (16)
Awesome thanks for taking the time to solve the problem and answer my questions.
from vscode-cpptools.
Thanks mate I will try this and let you know what happens.
from vscode-cpptools.
Could you please provide more information about how you are getting this error? It is likely that you have not correctly configured your task.json with the appropriate arguments.
from vscode-cpptools.
I haven't modified the tasks.json I let the extension do it automatically for me. here is a screenshot of the tasks.json
I am not sure, maybe it has something to do with me using Linux or the path of the file is not detected.
from vscode-cpptools.
Can you provide the output from the error window including the command that is generated by the run and debug command?
from vscode-cpptools.
@browntarik sorry for the late reply.
from vscode-cpptools.
It looks like there is an issue because of the '&' character in your path. Could you try renaming your directory to remove it and try the executable again?
If you would like to keep the ampersand you may have to escape it in the file path, but it is generally not recommended practice to use special characters in file paths.
from vscode-cpptools.
@browntarik so it worked when I indeed changed the ampersand character, I have another question when I use the the GCC from the dropdown it doesn't work, that's on a different directory but the g++ works as intended, does that have to do with Linux?
from vscode-cpptools.
Here are as well the dropdown menu in case you need it:
from vscode-cpptools.
Based on the error you showed me (i.e undefined reference to std::cout) I would guess that you are trying to use the gcc compiler to build a c++ project, please try using the g++ compiler instead.
from vscode-cpptools.
The g++ compiler works just fine.
If I understand correctly the gcc is for c projects and g++ for c++ projects?
from vscode-cpptools.
Yes, that is generally the case. You could use explicit linking if you have a specific reason to use gcc. To use explicit linking just add the -lstdc++ to your list of arguments though it is recommended you just use g++.
from vscode-cpptools.
I am glad I was able to help, I will now close this issue but it will be available for future reference.
from vscode-cpptools.
Hello there, I am facing the same error but on my Windows laptop.
from vscode-cpptools.
Could you please help?
from vscode-cpptools.
@dheerajparashar Hey there, it seems that in your case it's giving permission denied, I would have 2 solutions that I would try first.
- change the location of the project.
- change the permission of the folder.
The easiest is to change the project's location as it can be tedious to change the permission of the folder especially since it's in the C: folder and I haven't been having that much luck with permissions on Windows.
from vscode-cpptools.
Related Issues (20)
- [FR] vcFormat: new lines for branches HOT 3
- #include completion incorrectly completes -isystem includes in `#include ""` HOT 1
- crashes on startup HOT 15
- rename function name doesn't work in C project HOT 8
- Designated initializers squiggles HOT 1
- Debugging on WSL - Must kill the integrated terminal after each debugging session, or gdb will not launch. HOT 1
- C long double bug HOT 1
- 调试控制台显示异常的汉字
- CPP2 - Modules HOT 2
- IntelliSense not linting code if headers are incorrect. HOT 1
- Single step in debugger collapses all variables being watched HOT 1
- __attribute__((packed)) breaks intellisense HOT 29
- JSDoc-style multi-line comments are wrongly indented HOT 3
- outline view doesn't keep updated when adding/removing code HOT 3
- Allow configuration providers to provide the `compileCommands` file path HOT 11
- On Windows arm64 with LIBPATH set: command-line error: invalid option: --using_directoryC/C++(571) HOT 1
- Outline for C is wrong. HOT 5
- Spurious Intellisense Errors on MacOS CMake project HOT 3
- Parsing Open Files Stuck in Infinite Loop HOT 12
- The GitHub readme is great, but the marketplace readme is bare HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-cpptools.