Lingxiao Wang
Lingxiao Wang

Reputation: 31

"Invalid literal operator name" error after including chrono library in a VS2017 MFC project

Everything works fine before including the chrono library in a VS project, but after I include the chrono library, multiple errors raised:

enter image description here

These errors are located at Line 892 in the 'chrono' file:

enter image description here

Under the variable ns, the error information is this:

Invalid literal operator name.

The compile environment is in the "Release" mode and "x64".

When I delete the #include <chrono>, everything works fine again.

What is reason for this problem? I need to use this library in the project.

Upvotes: 0

Views: 141

Answers (1)

Lingxiao Wang
Lingxiao Wang

Reputation: 31

I wondered why the program only complains about the ns variable in the Chrono library. So I double-checked the program and found a huge mistake in a file: I defined ns as a macro. After changing the name of this macro, everything works fine.

Upvotes: 2

Related Questions