Cross platform shared library licensing via LexActivator?

I have a shared library I am considering licensing via LexActivator. The shared library will be part of a suite of tools plus and SDK.

The suite of tools is link to the shared library.

The SDK can be use to build new applications but will still need to link to the shared library.

What I hope to achieve is that the moment the shared library is loaded, it will trigger the LexActivator calls I can put in.

This shared library will be build for Linux, MacOS and Windows

Is there a portable way/location to place the LexActivator calls ?

I am considering __attribute__((constructor)) for Linux/MacOS and DllMain() for Windows. Are these suitable within the context of licensing via LexActivator.

Is there a recommended approach for licensing DLL that cryptlex recommends ?

Kind regards

Hi Nicholas,

Do you have any init type function in your library? That would be the best place to call LexActivator functions in your lib. Additionally you can add functions like set_license_key, validate_license etc. which would call LexActivator functions.

Since, you will will be shipping a lib, I would highly recommend using static linking to embed LexActiavtor in your app.