Page 1 of 1
VMP 3.0.7 - MAC OSX
Posted: Tue Jan 24, 2017 2:18 pm
by softtouch
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?
Re: VMP 3.0.7 - MAC OSX
Posted: Tue Jan 24, 2017 4:53 pm
by Admin
Try VMProtect.pas from the attachment.
Re: VMP 3.0.7 - MAC OSX
Posted: Wed Jan 25, 2017 1:10 am
by softtouch
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.
Re: VMP 3.0.7 - MAC OSX
Posted: Wed Jan 25, 2017 5:48 am
by Admin
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
Posted: Wed Feb 01, 2017 4:12 am
by Admin
Is it OK now?