-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Visual studio 2019 build tools provides error C1034: iostream: no include path set The terminal process terminated with exit code: 2 #3654
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
Comments
c_cpp_properties.json is just for configuring IntelliSense with our C/C++ extension and not building. The task.json has its own args you need to add something like |
You shouldn't have to add the system include path to the task. Do you get the same error when you try compiling in the Developer Command Prompt with the same arguments? |
It works from the development console it just gives some error about the semantics but it does compile. Could the issue be that the task.json is just not showing up ? |
without changing annything i now get the following error in vscode ?? fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64' (deleting obj file did not work) |
For now i'm using a code runner to bind F8 to run cl on the current file. As a workaround Issue not yet fixed |
Are you saying that code runner works? |
The code runner works and i opened VS Code from inside the Development console. |
I am unable to reproduce your problem, but I don't know what's missing at this point. Perhaps it's because all of my machines have Visual Studio installed, but really that shouldn't matter since iostream comes with your BuildTools installation. If you type |
We are unable to reproduce this problem. If you have any additional information you can share, please let us know and we can reopen the issue and investigate further. Thank you! |
I get the errors too, |
env: |
https://code.visualstudio.com/docs/cpp/config-msvc ,this document |
I finded the solution, you should start code frome x64 Native Tools Command Prompt. |
I ran into the same thing, but I was missing the first step from: i.e. "start VS Code from the Developer Command Prompt" this one fixed it for me. It initializes all the needed env variables for you. Thanks |
Are we required to start VS code from the Developer command prompt always ?? That's not convenient. |
@UtkarshBhatthere Yes, but there's an issue tracking a potential fix for that at #5271 . |
Dear People from the future looking to solve your issue: Here is what we have figured out so far:
@bobbrow I think you can ask this as issue as solved |
Hi, starting your Developer Command Prompt every time, then navigating to the project source, starting the app there... Using this process every time we write code and compile seems to be tedious. Is there any other way of doing this, where we can directly start the app, write code, compile, and run code. |
Well, it is the only way to get it working, as of now. If you are want and are able to, you could write a small script or such for opening that. But I am by no means a developer here. I only had this issue, and I had been trying to understand this here for a solid hour, so I wrote this summarizing note so others have it easier. |
Type: General
Input information below
Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.
Describe the bug
1.33.1
51b0b28134d51361cf996d2f0a1c698247aeabd8
x64
visual studio version:
NOT installed only build tools 2019 and c++ buildtools 2019
Getting the following error when ompiling
To Reproduce
Please include code sample and
task.json
files.c_cpp_properties.sjon
note same issue when using just "${workspaceFolder}/**", in include path
task.json
Steps to reproduce the behavior:
i pres ctrlshift b to build.
ans select c/c+: cl.exe build active file
(cant select task.json ?)
Expected behavior
it builds
The text was updated successfully, but these errors were encountered: