Home > Backend Development > C++ > body text

'Error: 'no member named 'signbit' in the global namespace' After Catalina Upgrade: What's the Solution?'

Patricia Arquette
Release: 2024-11-18 05:34:02
Original
127 people have browsed it

Error: "no member named 'signbit' in the global namespace" After Catalina Upgrade

When upgrading to macOS Catalina from Mojave, users have encountered an error when compiling programs using the header:

error: no member named 'signbit' in the global namespace
Copy after login

This error stems from the fact that Catalina purges and protects /usr/include with System Integrity Protection (SIP). Therefore, any projects that expect to find C headers in this directory will fail to compile.

Solution:

To resolve this issue, it is necessary to direct the build system to the appropriate headers:

  1. Ensure Xcode is Updated: Use the latest version of Xcode to avoid potential incompatibilities.
  2. Set CMAKE_OSX_SYSROOT: Set this variable to the result of xcrun --show-sdk-path using one of the following methods:

    • set(CMAKE_OSX_SYSROOT /sdk/path)
    • set(CMAKE_CXX_FLAGS "[...] -isysroot /sdk/path")

If these steps resolve the problem, consider exploring better approaches for setting these flags in CMake. Additionally, disabling SIP (although adventurous) may provide a temporary solution. However, it is recommended to report bugs to projects that still expect C headers in /usr/include.

The above is the detailed content of 'Error: 'no member named 'signbit' in the global namespace' After Catalina Upgrade: What's the Solution?'. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template