Home > Backend Development > C++ > body text

Why Am I Getting the 'No Member Named 'signbit' in Global Namespace' Error in Catalina C ?

DDD
Release: 2024-11-15 02:11:02
Original
401 people have browsed it

Why Am I Getting the

Catalina C : "No Member Named 'signbit' in Global Namespace" Error

When compiling a C program using headers after upgrading to Catalina from Mojave, users may encounter the error:

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

This issue arises when the compiler cannot locate the correct header, which contains the signbit function.

To resolve this problem, one must ensure that the compiler is pointed to the appropriate SDKheaders.

Solution

  • Verify the compiler version.
  • Set the CMAKE_OSX_SYSROOT variable to the correct SDK path using the xcrun --show-sdk-path command. This path should be used as the argument for -isysroot.
  • In CMake, this can be achieved by adding the following line to the CMakeLists.txt file:
set(CMAKE_CXX_FLAGS "[...] -isysroot /sdk/path")
Copy after login

where /sdk/path is the SDK path obtained from xcrun.

Additionally, disabling System Integrity Protection (SIP) may also resolve the issue.

The above is the detailed content of Why Am I Getting the 'No Member Named 'signbit' in Global Namespace' Error in Catalina C ?. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template