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

Compare with Current View Page History

« Previous Version 2 Next »

Compiling the LM-X SDK manually

Note: Extra effort is required when integrating LM-X Client library with your Java/.NET application: when compiling the LM-X SDK with Java support on any platform, the JAVA_HOME environment variable must be set.

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