Conditional directive to identify C++ Builder personalities

后端 未结 1 781
时光取名叫无心
时光取名叫无心 2021-01-20 23:28

I have a Delphi component which I want to install and have it available at the component palette in Delphi but not in C++ Builder. In BDS/RAD 2006 and above I can either have it

1条回答
  •  梦谈多话
    2021-01-21 00:16

    the BCB define is only set when Delphi is compiling with support for C++Builder (using the -J switches) You can use code like this to detect that someone is trying to build your package with C++ support and issue an error

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

    0 讨论(0)
提交回复
热议问题