tmighty
tmighty

Reputation: 11389

C1189 #error: /RTCc rejects conformant code

I try to compile the following solution:

https://github.com/TimoKunze/EditControls

When I try to compile it using VS 2022, I am getting the following compiler error:

Error C1189 #error: /RTCc rejects conformant code, so it is not supported by the C++ Standard Library. Either remove this compiler option, or define _ALLOW_RTCc_IN_STL to acknowledge that you have received this warning.
EditCtls C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.34.31721\include\yvals_core.h 1542

How could I get rid of this compiler error?

Here are my directories:

Include directories: D:\Projects\Libraries\WTL\Include;$(IncludePath);$(VCInstallDir)atlmfc\include

External Include Directories: $(VC_IncludePath);$(WindowsSDK_IncludePath);

Library directories: $(ProgramFiles)\Windows Kits\10\Lib\10.0.10586.0\um\x86;$(LibraryPath);$(VSInstallDir);$(VSInstallDir)lib

Library WinRT directories: $(WindowsSDK_MetadataPath);

Source directories: $(VC_SourcePath);

I am pretty new with C++, and I don't know how to "define _ALLOW_RTCc_IN_STL to acknowledge that I have received this warning."

I also don't see that the /RTCs is defined anywhere in the project property page. Where would I find that?

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here

Upvotes: 0

Views: 1504

Answers (1)

ya_est_Sanya
ya_est_Sanya

Reputation: 1

As I found out from this https://adn-cis.org/forum/index.php?topic=7477.0 Problem with RTCc option of compiler. So apparently there are 3 alternative solutions:

  1. Do not install Update 2 for Visual Studio and subsequent ones (but they seem to greatly improve the performance of STL)
  2. Remove the compiler option /RTCc (C++/code generations in settings)
  3. Declare the _ALLOW_RTCc_IN_STL variable somewhere (I did it in preprocessor)

Upvotes: 0

Related Questions