Now that you have a license template, you can integrate LM-X with your application. First, try the following examples, which are already integrated with LM-X, to get a better understanding of how it works. After running the examples, you can integrate LM-X with your application in the same way as described here.
To use the LM-X API in your code and make the code compile, you must:
- Include the lmx.h header file.
- Add the include path for LM-X to the include directories.
Link with the liblmxclient library.
To perform these steps, do the following:
For Windows, in Visual Studio:
- Include this code into your application to import the LM-X functions:
#include "lmx.h"
- Under Configuration Properties, select C/C++.
- Add the LM-X path, LM-X_dir\include, to the Additional Include Directories.
- Under Additional Dependencies, add the LM-X library path, for example:
LM-X_dir\win32_x86\liblmxclient_mt.lib
For Unix, at a command line:
- Include this code into your application to import the LM-X functions:
#include "lmx.h"
- With the GCC compiler, specify an LM-X include directory:
gcc -c –I LM-X_dir/include source_file - When linking, specify the LM-X library paths, for example:
gcc -o application objects LM-X_dir/lib/liblmxclient.a
With your development environment ready to use the LM-X API, you will be able to implement license checking in your application code.