C ++ Builder Conditional Identity Guide

I have a Delphi component that I want to install and have it available in the component palette in Delphi, but not in C ++ Builder. In BDS / RAD 2006 and above, I can either set it for both individuals or not.

I need to do this because this component uses third-party libraries that do not support C ++ Builder.

I looked through jedi.inc mentioned here , but I could not find a combination to be able to register the component only in Delphi personas. The component should also work for older Delphi versions: D5, D6, and D7; but not for BCB5 and BCB6. Is it possible?

BTW: The component is written in Delphi. C ++ Builder uses the same packages as Delphi.

Thanks in advance.

+3
source share
1 answer

the BCB definition is only set when compiling Delphi with C ++ Builder support (using -J switches). You can use this code to find that someone is trying to create your C ++-enabled package and throw an error

{$IFDEF BCB}
{$Message Error 'This component is not usable in C++Builder'}
{$ENDIF BCB}
+5
source

Source: https://habr.com/ru/post/1740886/


All Articles