Anonymous class error c++ xcode

I am trying to run a python script which includes a wrapper for a c++ code. The script runs on a linux machine without any issues. When I compile the c++ part with make, it throws me this error:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__filesystem/path.h:446:1: fatal error: declaration of anonymous class must be a definition class _LIBCPP_EXPORTED_FROM_ABI path { ^ 1 error generated.

Can anybody help me with fixing this? Thanks!

I tried re-installing both the Command Line Tools and XCode but nothing seems to work. I do not have any anaconda/brew/ports installed.

Replies

A good first step with problems like this is to try compiling a minimal C++ program, just to make sure that something isn’t borked with your tools setup. I have example of that here.

If that works you can start adding code snippets from your main source base to see if you can reproduce the problem.

Share and Enjoy

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

Hi Eskimo,

I did that and everything works just fine. My macbook is brand new so I do not see how something can be broken with the tools setup. Any other suggestions?

Cheers, Alessia