I need to call Log.d
that is defined inside FMX.Types. However my project is not a Firemonkey project, it's a VCL project. It compiles and works as expected but I receive this warning :
[dcc64 Hint] H2161 Warning: Duplicate resource: Type 12 (CURSOR GROUP), ID 32761; File c:\program files (x86)\embarcadero\studio\18.0\lib\Win64\release\FMX.Controls.Win.res resource kept; file c:\program files (x86)\embarcadero\studio\18.0\lib\Win64\release\Controls.res resource discarded.
Is their any global define that could indicate that the project is a VCL project so that I can omit to use FMX.Types and Log.d
on VCL project ?
To expand a little on my comment, you could sidestep the whole problem by simply "brewing your own" Log.d
equivalent. Log.d
calls OutputDebugString
on Windows, so you could build something along the following lines and leave the FMX.Types helper unit entirely out of the equation, and avoiding the problem entirely:
uses Windows;
procedure Log(const Msg: string; const Args: array of const); overload;
var
LMsg: string;
begin
LMsg := Format(Msg, Args);
OutputDebugString(PChar(LMsg));
end;
procedure Log(const Msg: string); overload;
begin
OutputDebugString(PChar(Msg));
end;