0

I'm trying to #include <lib/mylib.h> header into Prefix.pch with Xcode precompiled header turned on. However, this breaks the build with error

`atomic` file not found.

, which is caused by #include <atomic> in the offending spdlog.h header.

My project supports C++11 perfectly. But the build passes if I move #include <lib/mylib.h> out of the precompiled header and put it in a source file instead.

How should I fix the build while keeping the header included in the precompiled header?

kakyo
  • 10,460
  • 14
  • 76
  • 140

1 Answers1

0

OK, solved it myself.

Some of my source files are in ObjC instead of ObjC++, which caused the build break. Too bad the error message is not very helpful in such a case.

kakyo
  • 10,460
  • 14
  • 76
  • 140