c++ compiler not working after macOS sequoia update

after updating to macOS sequoia C++ compiler on vscode is not working is it just me or it is a common issue ?

Answered by DTS Engineer in 804330022

It’s probably just you |-:

I have a post that covers this general topic: Investigating Third-Party IDE Integration Problems. Please run through that process and write back if you hit a snag with the Apple side of this.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

It’s probably just you |-:

I have a post that covers this general topic: Investigating Third-Party IDE Integration Problems. Please run through that process and write back if you hit a snag with the Apple side of this.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I am seeing this on my Mac which I've just upgraded to Sequoia:

$ cat hello.cpp
#include <iostream>
int main() {
  std::cout << "Hello, world!!\n";
}
$ clang hello.cpp
hello.cpp:1:10: fatal error: 'iostream' file not found
    1 | #include <iostream>
      |          ^~~~~~~~~~
1 error generated.

I have one Mac with Sonoma where this works; the above error is from my other Mac where I just installed Sequoia. I do C++ development (on multiple platforms) for a living -- the only change is my having installed Sequoia on my one Mac, whereat a hello-world C++ program no longer compiles.

After uninstall and reinstall of xcode (version 2409 reported before & after) I can compile hello-world using clang++ and g++

I am also getting same error test.cc:1:10: fatal error: 'iostream' file not found 1 | #include <iostream> | ^~~~~~~~~~ 1 error generated. make: *** [test] Error 1 while compiling from terminal, but Xcode is working

Problem solved after upgrading os to latest version

https://github.com/ggerganov/llama.cpp/issues/9575

At the very bottom someone says to do

sudo rm -rf /Library/Developer/CommandLineTools/
xcode-select --install

and it worked for me!!!! If this is a bad idea dont do it obviously im a novice dev

After I did this: sudo rm -rf /Library/Developer/CommandLineTools/ xcode-select --install

I also deleted the default sdk (MacOSX.sdk), and only left "MacOSX15.2.sdk" and "MacOSX15.sdk"

Then it works

I also experienced same after upgrading to Sequoia 15.3.1 and found clang++ stopped working. It started throwing error "fatal error: 'iostream' file not found". As as fix, I had to remove CommandLineTool:

sudo rm -rf /Library/Developer/CommandLineTools/ 

and reinstall xcode by:

xcode-select --install 

This command threw an installation popup and took a few minutes to complete the installation. After successful installation, I checked CommondLineTool by:

ls -l /Library/Developer/CommandLineTools

, that showed:

drwxr-xr-x   5 root  wheel  160 Nov 17  2023 Library
drwxr-xr-x  10 root  wheel  320 Feb 24 00:33 SDKs
drwxr-xr-x   7 root  wheel  224 Jan 15  2024 usr

It solved the defect and clang++ started working for me.

c++ compiler not working after macOS sequoia update
 
 
Q