You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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: 

  1. Include this code into your application to import the LM-X functions:
    #include "lmx.h"
  2. Under Configuration Properties, select C/C++.
  3. Add the LM-X path, LM-X_dir\include, to the Additional Include Directories.
  4. 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:

  1. Include this code into your application to import the LM-X functions:
    #include "lmx.h"
  2. With the GCC compiler, specify an LM-X include directory:
    gcc -c –I LM-X_dir/include source_file
  3. 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.

  • No labels