ALLOW_RTCc_IN_STL preprocessor usage

ALLOW_RTCc_IN_STL preprocessor usage

ranga.narasimhan
Advocate Advocate
548 Views
3 Replies
Message 1 of 4

ALLOW_RTCc_IN_STL preprocessor usage

ranga.narasimhan
Advocate
Advocate

I recently installed acad 2024, VS 2022, ObjectARX wizard 2024.

 

I created a basic ARX project using the wizard and attempted to compile as it is.

 

I immediately got this error; #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 suppress this error.

 

So I changed the following snippet in stdafx.h

 

ranganarasimhan_0-1743195572171.png

 

to 

 

ranganarasimhan_2-1743195639846.png

 

 

- Is it OK to do this? Any consequences?? I'll be using MFC later in the project. Also I do dynamic type casting sometimes ;).

- Why in the first place the wizard did not define this?

- And why the (already) commented section did not have _ALLOW_RTCc_IN_STL? See first picture first line.

 

Thx

0 Likes
Accepted solutions (1)
549 Views
3 Replies
Replies (3)
Message 2 of 4

tbrammer
Advisor
Advisor
Accepted solution

1) Yes, it is ok to do so.

 

2) > Why in the first place the wizard did not define this?
Maybe because you have two options to deal with this:
Either #define _ALLOW_RTCc_IN_STL

Or set the project option C/C++ → Code generation→Check small types   to "No"

For more information about the /RTCc switch see this article.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 3 of 4

ranga.narasimhan
Advocate
Advocate

Thank you @tbrammer .

0 Likes
Message 4 of 4

kerry_w_brown
Advisor
Advisor

 

@tbrammer ,

 

Thanks,

I had the same issue today with the 2025 wizard ( out of the box )

 

Regards,

 


// Called Kerry or kdub in my other life.

Everything will work just as you expect it to, unless your expectations are incorrect. ~ kdub
Sometimes the question is more important than the answer. ~ kdub

NZST UTC+12 : class keyThumper<T> : Lazy<T>;      another  Swamper
0 Likes