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.

I've done some comparisons between my two Macs, one of which couldn't compile anything. It occurred from time to time on the latter that some included header was not found, but launching make again succeeded.

Recently, clang++ started to always fail on that machine at the first include it met, while Xcode hadn't that problem. Toggling between uninstall and install of Xcode and the CLI tools didn't help.

Apple supplies two distinct SDK sets: one embedded in Xcode, and the other for use by the CLI tools. For some reason, the latter recently got confused as to where to find the headers when Xcode was also installed on the machine.

The (temporary?) solution has been for me to uninstall Xcode, keeping only the CLI tools. A matter for Apple guys to think over...

c&#43;&#43; compiler not working after macOS sequoia update
 
 
Q