##include <iostream> is unrecognized

47 messages · Page 1 of 1 (latest)

livid fjord
#

I use VS code. Once I launched new file it started happening everywhere. g++ is okay

valid moonBOT
#

When your question is answered use !solved or the button below to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

#

@livid fjord

Screenshots!

Your message appears to contain screenshots but no code. Please send code and error messages in text instead of screenshots if applicable!

livid fjord
#

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (D:\cpp\practice\oparisi\main.cpp).
could not open source file "iostream" (no directories in search list). Please run the 'Select IntelliSense Configuration...' command to locate your system headers.

limber blaze
livid fjord
#
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "cl.exe",
            "cStandard": "c23",
            "cppStandard": "c++26",
            "intelliSenseMode": "windows-msvc-x64"
        }
    ],
    "version": 4
}```
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command g++ -g 'D:\cpp\practice\oparisi\main.cpp' -o 'D:\cpp\practice\oparisi/main.exe'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.
last tree
#

Are you using msys2?

livid fjord
limber blaze
#

also why dont you use VisualStudio instead?

livid fjord
#

I used Visual studio, but I like vscode more

limber blaze
#

Open your command prompt and type in where cl.exe. Then paste the output

livid fjord
#

I think I dont have cl.exe, it answered nothing

last tree
limber blaze
livid fjord
last tree
livid fjord
#

And when I type in cl --version it gives me version

last tree
limber blaze
# last tree Huh. What kind of issues?

If you use github copilot then any command will be in a form of a powershell commands. Which then causes issues as its syntax mixes with cmd prompt making it all crash.

It also has issues by itself with args. Dunno if they fixed it already but I wouldnt bet on that.

livid fjord
#

Frod VisualStudio build tools 2022

limber blaze
last tree
last tree
#

What exactly does where cl.exe show?

livid fjord
#

Just silence

limber blaze
#

can you send a screenshot?

livid fjord
last tree
#

huh

#

Try gcm cl.exe

limber blaze
last tree
livid fjord
#

This what I get from x64 Native tools...

last tree
livid fjord
#
-----------     ----                                               -------    ------
Application     cl.exe                                             14.44.3... C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe```
last tree
#

Aha. So it's just where not working in powershell

#

@limber blaze What were you planning to do with the CL path 😛

limber blaze
#

but I guess if its in the path then cl.exe is fine

livid fjord
#

Path is alright. I added every complier and interpretator I need

last tree
#

Then my recommendation would be to install mingw-w64-x86_64-clang-tools-extra in it, and install the Clangd extension in VSC. This replaces the stock intellsense with the Clangd one, which should be better in general

#

And should find your headers out of the box

livid fjord
#

Ill try this tomorrow and write back here

livid fjord
#

Thank you so much guys, it started working

#

!solved