I am trying to protect a firemonkey application (Win32/Win64/OSX).
I include like I usually do vmprotectsdk in the uses list. Works as it should when compiling for win32/win64, but when I switch to OSX as target, I get an error that "VMProtectDLLName" is unknown in vmprotectsdk.
So how can I compile a MAC OSX app using vmprotectsdk?
VMP 3.0.7 - MAC OSX
Re: VMP 3.0.7 - MAC OSX
Try VMProtect.pas from the attachment.
- Attachments
-
- VMProtectSDK.zip
- (1.44 KiB) Downloaded 333 times
Re: VMP 3.0.7 - MAC OSX
Its the same, when OSX as target is selected, I get:
[dccosx Error] VMProtectSDK.pas(100): E2003 Undeclared identifier: 'VMProtectDLLName'
The line with the first error is this:
procedure VMProtectBegin(MarkerName: PAnsiChar); {$IFDEF MACOSX} cdecl {$ELSE} stdcall {$ENDIF}; external {$IFNDEF DARWIN}VMProtectDLLName{$ENDIF} {$IFDEF MACOS} name '_VMProtectBegin'{$ENDIF};
which means that darwin is not defined.
[dccosx Error] VMProtectSDK.pas(100): E2003 Undeclared identifier: 'VMProtectDLLName'
The line with the first error is this:
procedure VMProtectBegin(MarkerName: PAnsiChar); {$IFDEF MACOSX} cdecl {$ELSE} stdcall {$ENDIF}; external {$IFNDEF DARWIN}VMProtectDLLName{$ENDIF} {$IFDEF MACOS} name '_VMProtectBegin'{$ENDIF};
which means that darwin is not defined.
Re: VMP 3.0.7 - MAC OSX
Delphi is very strange compiler ) Try this:
Code: Select all
{$IFDEF WIN64}
const VMProtectDLLName = 'VMProtectSDK64.dll';
{$ELSE}
{$IFDEF WIN32}
const VMProtectDLLName = 'VMProtectSDK32.dll';
{$ELSE}
{$IFDEF MACOSX}
{$IFDEF DARWIN}
{$LINKLIB libVMProtectSDK.dylib}
{$ELSE}
const VMProtectDLLName = 'libVMProtectSDK.dylib';
{$ENDIF}
{$ELSE}
{$FATAL Unsupported OS!!!}
{$ENDIF}
{$ENDIF}
{$ENDIF}
Re: VMP 3.0.7 - MAC OSX
Is it OK now?