Hi,
I want to use Cryptlex Licensing with Matlab. I use Matlab 2021a, Win10, VS 2017++ compiler. (I know it says use VS 2015 for compatibility, but I assume backward compat?!)
The error I get when I run
loadlibrary(sharedLibrary, headerFile, ‘addheader’, statusHeaderFile);
is the following:
Error using loadlibrary
Building LexActivator_thunk_pcwin64 failed. Compiler output is:
cl -I"C:\Program Files\MATLAB\R2021a\extern\include" /Zp8 /W3 /nologo -I"C:\**"
-I"C:\***\headers" "LexActivator_thunk_pcwin64.c" -LD -Fe"LexActivator_thunk_pcwin64.dll"
LexActivator_thunk_pcwin64.c
C:\***\headers\LexActivator.h(341): error C2143: syntax error: missing ')' before '='
C:\***\headers\LexActivator.h(341): error C2072: 'GetLicenseMeterAttribute': initialization of a function
C:\***\headers\LexActivator.h(341): error C2059: syntax error: ')'
It occurs because l.341 uses “Default values in parameters” which is a C++ feature, but loadlibrary requires C. Can you help me fix this issue?