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

Compare with Current View Page History

« Previous Version 24 Next »

The information on this page refers to LM-X v4.4.5 and newer, which added the ability to compile a clean SDK. If you are using an older version of LM-X, refer to documentation for v4.4.4 and earlier. 

You install the LM-X SDK using an installation program (for both Windows and Unix), which will let you automatically:

  • Install and compile the SDK
  • Obtain the license file, copy it to the proper directory, and activate the license
  • Copy the security_config.lmx file from a previous LM-X installation to the proper directory
  • Navigate to the installation directory and execute the makefile

The installer places the LM-X license file (lmx.lic) in the config directory. The license file contains the software expiration date (after which xmllicgen will not generate new licenses) and the platforms on which you can compile and run LM-X. The installer will activate the LM-X license for you, or you can activate it manually as described in our Knowledgebase article, Activating licenses using License Activation Center. Note that after each runtime execution, some files will be written to the temp directory and, like any files in the temp directory, can be removed after execution if desired.

Upon first compilation of the LM-X SDK, the LM-X security configuration file (security_config.lmx) is automatically created in the config directory. This file holds various security-related parameters, and is used to create license files and embed the security configuration into the license server and client libraries.

Important: You must reuse this security configuration file for the lifetime of your application. When updating to new builds of LM-X or compiling LM-X on multiple platforms, the installer will let you choose an existing security configuration file. If you do not choose an existing security configuration file while running the installer, you must manually place the file in the config directory after installing the SDK.

See also Performing a silent installation.

Compiling the LM-X SDK manually

If needed, you can recompile the LM-X SDK manually after initial installation. Manual compilation is needed only if you are extending the license server source code with your own code, changing the security configuration file, or changing the license file.

Before recompiling the LM-X SDK, put your compiled source code in the ./platform/vendor directory (where platform is the platform-specific directory as listed in the table below). Placing the source code in this directory will allow you to compile without requiring any modifications to the SDK.

By default, when you install the SDK, Visual Studio opens to let you compile the SDK. We recommend that you use the project files and use the Build, Clean and Rebuild UI actions within the IDE to compile and recompile the SDK. Alternatively, you can compile the SDK from a command line using nmake, as described below.

Compiling the SDK from a command line

To compile the SDK from a command line, execute the makefile from the root directory of the LM-X distribution:

On Windows, type: nmake (for example, C:\lm-x_distrib> nmake). Alternatively, you can use Visual Studio solutions lmx_vs2008.sln, lmx_vs2010.sln, or lmx_vs2012.sln.

On Unix, type: make (using GNU make; for example, /home/user1/lm-x_distrib$ make). 

Alternatively, you can clean previously compiled files (for example, when rebuilding the SDK with a different license or security key) using the following command: 

On Windows, type: nmake clean

On Unix, type: make clean 

Notes:

  • For Windows 64-bit builds, be sure to set the environment properly, for example by running the following command:
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall x86_amd64
  • If you have multiple platforms, see Building LM-X for multiple platforms, below. If you have any problems compiling the LM-X SDK, see Troubleshooting, below.
  • Most Unix platforms use the command "make"; however, some platforms may use "gmake."

Directory Structure

After you've compiled the platform-specific files, your LM-X directory structure should look similar to the following:

Directory

Contents

/include.mk

File defining which platform to compile examples for.

/config

Security configuration file.

/include

Shared header files across all platforms.

Platform-specific directories, such as:
/win32_x86
/linux_x86
/darwin_universal
/solaris_sparc

Platform-specific files.

Note: If you want to compile the examples for a particular platform, you must change \include.mk, where the variable PLATFORM specifies which platform the examples are compiled for. 

Mixing files works only between identical versions of LM-X; for example, v4.2 files are not compatible with v4.3 files. You can verify the same version is being used by checking the version.txt file.

Building LM-X for multiple platforms

To build LM-X for multiple platforms:

  1. Install one of the distributions, and make sure the security configuration file is in place.
  2. Copy or move the platform-specific directory (for example, win32_x86 or solaris_sparc) to the root directory of LM-X. (Only platform-specific files are stored in the platform-specific directory. All shared files exist in the include directory, which is also located in the LM-X root directory.)
  3. From the platform-specific directory, compile the platform-specific files. 
    • On Windows, type: nmake (for example, C:\lm-x_distrib\win32_x86> nmake). Alternatively, you can use Visual Studio solutions lmx_vs2008.sln, lmx_vs2010.sln, or lmx_vs2012.sln.
    • On Unix, type: make (using GNU make).

(Note that most Unix platforms use the command "make"; however, some platforms may use "gmake.")

Troubleshooting

If you experience any installation problems, try the following troubleshooting steps. 

  • If nmake fails under Windows, the compiler environment for Visual Studio may not be set up properly.

    To set it on the command line, you can run vcvars32.bat, typically located in C:\Program Files\Microsoft Visual Studio version#\VC\bin. Be sure to use the same console to execute nmake that you used to run the batch file.
  • If you get C# (csc.exe) errors, make sure the .NET framework location is included in your PATH variable. For example:

    For Visual Studio 2008: C:\WINDOWS\Microsoft.NET\Framework\v3.5
    For Visual Studio 2010: C:\Windows\Microsoft.NET\Framework\v4.0.30319
    For Visual Studio 2012: C:\Windows\Microsoft.NET\Framework\v4.0.30319
  • No labels