Fix arch not recognized compiled by llvm-mingw

Issues related to VMProtect
Post Reply
andyco
Posts: 16
Joined: Mon Jan 03, 2022 10:20 am

Fix arch not recognized compiled by llvm-mingw

Post by andyco »

I cross compile PE with llvm-mingw in macos.
Prompt error: #error "Unsupported target architecture"
Then I found a solution.

Code: Select all

#define VMP_IMPORT __declspec(dllimport)
#define VMP_API __stdcall
#define VMP_WCHAR wchar_t
#ifdef _M_IX86 || __i386__
#pragma comment(lib, "VMProtectSDK32.lib")
#elif _M_X64 || __x86_64__
#pragma comment(lib, "VMProtectSDK64.lib")
#elif _M_ARM64 || __aarch64__
#pragma comment(lib, "VMProtectARM64.lib")
#else
#error "Unsupported target architecture"
#endif
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Fix arch not recognized compiled by llvm-mingw

Post by Admin »

Thank you.
Post Reply