Post

Replies

Boosts

Views

Activity

Reply to error: no member named 'nullptr_t' in the global namespace
Thanks for the quick reply ! I went through your post and have some more info. Your C diagnostic test exampled compiled but it spewed out a ton of warnings, see some here: clang -o hello hello.c In file included from hello.c:1: In file included from /usr/local/include/stdio.h:64: /usr/local/include/_stdio.h:93:16: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] unsigned char *_base; ^ /usr/local/include/_stdio.h:93:16: note: insert '_Nullable' if the pointer may be null unsigned char *_base; ^ _Nullable /usr/local/include/_stdio.h:93:16: note: insert '_Nonnull' if the pointer should never be null unsigned char *_base; ^ _Nonnull ... /usr/local/include/stdio.h:393:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness] FILE *funopen(const void *, ^ /usr/local/include/stdio.h:393:6: note: insert '_Nullable' if the pointer may be null FILE *funopen(const void *, ^ _Nullable /usr/local/include/stdio.h:393:6: note: insert '_Nonnull' if the pointer should never be null FILE *funopen(const void *, ^ _Nonnull 13 warnings generated. I am not sure if this is in any way related to the issue I was having with C++. I ran the C++ test on a new macOS installation in a VM and it ran just fine. I wanted to add that all of the issues that I have been facing are directly from clang, as I have exclusively been using my terminal while trying to solve this issue, no IDE. I ran the test again on a separate user account and the issue persisted. I tried to cross reference environment variables between my main account, test account, and the vm, with no success, using both zsh and bash. I am tempted to reinstall macOS completely as I believe this issue somehow stems from migration assistant.
Aug ’23
Reply to error: no member named 'nullptr_t' in the global namespace
Hi, I am having the same issue on my machine, and I've tried every solution I've found here, but none have worked. I reinstalled xCode and Command Line Tools and have searched for the CPLUS_INCLUDE_PATH variable everywhere. I have also migrated from an intel machine to apple silicon using migration assistant. Using the same Test.cpp file that @supertwang provided, and clang++ -std=c++17 -stdlib=libc++ -g -c -o Test.o Test.cpp --verbose, here is the output: Apple clang version 14.0.3 (clang-1403.0.22.14.1) Target: arm64-apple-darwin22.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin ... clang -cc1 version 14.0.3 (clang-1403.0.22.14.1) default target arm64-apple-darwin22.6.0 ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/local/include" ignoring nonexistent directory "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/Library/Frameworks" #include "..." search starts here: #include <...> search starts here: /usr/local/include /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 /Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/include /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include /Library/Developer/CommandLineTools/usr/include /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks (framework directory) End of search list. In file included from Test.cpp:1: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:50:9: error: no member named 'nullptr_t' in the global namespace using ::nullptr_t; ~~^ 1 error generated. I'm not sure what the 'ignoring nonexistent directory' outputs are about. I have also run this using a new user account and the errors remained the same. Here are the outputs of the commands @eskimo provided: sw_vers ProductName: macOS ProductVersion: 13.5 BuildVersion: 22G74 xcode-select -p /Library/Developer/CommandLineTools pkgutil --pkgs com.apple.pkg.CLTools_SDK_macOS13 com.apple.pkg.CLTools_SDK_macOS12 com.apple.pkg.MAContent10_AssetPack_0637_AppleLoopsDrummerKyle com.apple.pkg.MAContent10_AssetPack_0593_DrummerSoCalGBLogic com.apple.pkg.CLTools_Executables com.apple.files.data-template com.apple.pkg.MobileAssets com.apple.pkg.MAContent10_AssetPack_0317_AppleLoopsModernRnB1 com.apple.pkg.MAContent10_AssetPack_0537_DrummerShaker com.apple.pkg.MAContent10_AssetPack_0482_EXS_OrchWoodwindAltoSax com.apple.pkg.CoreTypes.1650A12 com.apple.pkg.MAContent10_AssetPack_0048_AlchemyPadsDigitalHolyGhost com.apple.pkg.MAContent10_AssetPack_0539_DrummerTambourine com.apple.pkg.MAContent10_AssetPack_0323_AppleLoopsVintageBreaks com.apple.pkg.MAContent10_AssetPack_0487_EXS_OrchWoodwindFluteSolo com.apple.pkg.MAContent10_AssetPack_0557_IRsSharedAUX com.apple.pkg.MAContent10_AssetPack_0484_EXS_OrchWoodwindClarinetSolo com.apple.pkg.MRTConfigData_10_15.16U4211 com.apple.pkg.XProtectPayloads_10_15.16U4260 com.apple.pkg.MAContent10_AssetPack_0310_UB_DrumMachineDesignerGB com.apple.pkg.XProtectPlistConfigData_10_15.16U4254 com.apple.pkg.MAContent10_AssetPack_0316_AppleLoopsDubstep1 com.apple.pkg.MAContent10_AssetPack_0491_EXS_OrchBrass com.apple.pkg.MAContent10_AssetPack_0560_LTPBasicPiano1 com.apple.pkg.MAContent10_AssetPack_0315_AppleLoopsElectroHouse1 com.apple.pkg.XProtectPlistConfigData_10_15.16U4256 com.apple.pkg.MAContent10_AssetPack_0322_AppleLoopsDiscoFunk1 com.apple.pkg.MAContent10_AssetPack_0597_LTPChordTrainer com.apple.pkg.MAContent10_AssetPack_0540_PlugInSettingsGB com.apple.pkg.MAContent10_AssetPack_0375_EXS_GuitarsVintageStrat com.apple.pkg.MAContent10_AssetPack_0806_PlugInSettingsGBLogic com.apple.pkg.MAContent10_AssetPack_0615_GBLogicAlchemyEssentials com.apple.pkg.MAContent10_AssetPack_0509_EXS_StringsEnsemble com.apple.pkg.MAContent10_AssetPack_0324_AppleLoopsBluesGarage com.apple.pkg.MAContent10_AssetPack_0314_AppleLoopsHipHop1 com.apple.pkg.XProtectPayloads_10_15.16U4251 com.apple.pkg.RosettaUpdateAuto com.apple.pkg.XProtectPayloads_10_15.16U4255 com.apple.pkg.MAContent10_AssetPack_0325_AppleLoopsGarageBand1 com.apple.pkg.MAContent10_AssetPack_0371_EXS_GuitarsAcoustic com.apple.pkg.MAContent10_AssetPack_0312_UB_UltrabeatKitsGBLogic com.apple.pkg.MAContent10_AssetPack_0646_AppleLoopsDrummerElectronic com.apple.pkg.MAContent10_AssetPack_0598_LTPBasicGuitar1 com.apple.pkg.MAContent10_AssetPack_0354_EXS_PianoSteinway com.apple.pkg.MAContent10_AssetPack_0321_AppleLoopsIndieDisco com.apple.pkg.MAContent10_AssetPack_0538_DrummerSticks com.apple.pkg.MAContent10_AssetPack_0358_EXS_BassElectricFingerStyle com.apple.pkg.MobileDeviceDevelopment com.apple.pkg.CLTools_SwiftBackDeploy com.apple.pkg.MAContent10_AssetPack_0554_AppleLoopsDiscoFunk2 com.apple.pkg.CLTools_macOS_SDK com.apple.pkg.MAContent10_AssetPack_0536_DrummerClapsCowbell com.apple.pkg.MAContent10_AssetPack_0357_EXS_BassAcousticUprightJazz com.apple.pkg.MAContent10_AssetPack_0320_AppleLoopsChillwave1 com.apple.cdm.pkg.Pages_MASReceipt com.microsoft.Powerpoint com.microsoft.rdc.macos com.apple.pkg.Pages13 com.apple.cdm.pkg.Keynote_MASReceipt com.apple.pkg.Pages12 com.apple.pkg.iMovie_AppStore com.flexibits.fantastical2.mac com.brave.Brave com.apple.pkg.GarageBand_AppStore com.microsoft.Word com.apple.cdm.pkg.Numbers_MASReceipt com.microsoft.teams com.apple.pkg.Keynote13 com.apple.pkg.Keynote12 com.apple.cdm.pkg.GarageBand_MASReceipt com.gingerlabs.Notability me.damir.dropover-mac com.apple.pkg.Xcode com.readdle.smartemail-Mac com.apple.cdm.pkg.iMovie_MASReceipt us.zoom.pkg.videomeeting com.apple.pkg.Numbers12 com.goodnotesapp.x com.microsoft.Outlook com.apple.cdm.pkg.SetupMacOSRecoveryDependencies com.microsoft.Excel I appreciate your time, thank you for your help in advance.
Jul ’23