Page 1 of 1

Fix arch not recognized compiled by llvm-mingw

Posted: Thu Feb 02, 2023 1:55 pm
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

Re: Fix arch not recognized compiled by llvm-mingw

Posted: Thu Feb 02, 2023 3:46 pm
by Admin
Thank you.