VMP 3.0.7 - MAC OSX

Issues related to VMProtect
Post Reply
softtouch
Posts: 5
Joined: Fri Oct 02, 2015 8:15 am

VMP 3.0.7 - MAC OSX

Post 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?
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: VMP 3.0.7 - MAC OSX

Post by Admin »

Try VMProtect.pas from the attachment.
Attachments
VMProtectSDK.zip
(1.44 KiB) Downloaded 333 times
softtouch
Posts: 5
Joined: Fri Oct 02, 2015 8:15 am

Re: VMP 3.0.7 - MAC OSX

Post 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.
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: VMP 3.0.7 - MAC OSX

Post 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}
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: VMP 3.0.7 - MAC OSX

Post by Admin »

Is it OK now?
Post Reply