tgmath.h doesn’t work if modules are enabled

I’m not sure what’s causing the issue, but as a workaround you could at least disable modules for only the file(s) where you’re using tgmath.h:

  • Navigate to the target’s Build Phases tab in Xcode.
  • Under the Compile Sources phase, locate the source files.
  • Double-click the source file and type -fno-modules in the Compiler Flags popover to disable Clang modules for that file.

At least this way you would still get the benefits of modules in most of your project. (This is assuming, of course, you don’t need tgmath.h in the majority of your source files.)

Leave a Comment

404 Not Found

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.