Next: Running the Example Applications
NOTE: premake4 support is deprecated in the 2021 release and will be removed in a future release. We recommend using CMake for all new projects: Compiling and Installing the SDK - CMake (v8.0.0+).
Compiling for Windows
- Install Microsoft Visual Studio (MSVS).
- Note: Versions 2010, 2012, 2013, and 2015 have all been tested and shown to work.
- Open a Windows command prompt.
- Navigate to the folder of the library (project) to be compiled.
- Generate an MSVS project by running premake4 using the command:
premake4 vs2010
- To view available options for premake4 use the --help flag with the premake4 command. Flags to create MSVS projects other than the core libraries are available among other options.
- Note: Use 'vs2010' even if you're using a newer version of MSVS. The project can be upgraded later using the 'Retarget solution' command in MSVS .
- To view available options for premake4 use the --help flag with the premake4 command. Flags to create MSVS projects other than the core libraries are available among other options.
- Open the generated solution in MSVS and allow it to automatically upgrade.
- Compile the code in MSVS
- Note: On some versions of MSVS a fatal error LNK1210 might be encountered while compiling the org.openjaus.iop-v2.cpp project. This can be handled by changing the setting /INCREMENTAL to NO in the Properties->Linker->Enable Incremental Linker setting.
Compiling for Desktop Linux
- Install the GNU C and C++ compiler tools.
- Open a linux shell.
- Navigate to the folder of the library (project) to be compiled.
- Generate the necessary Makefiles by running premake4 using the command:
./premake4 gmake
- To view available options for premake4 use the --help flag with the premake4 command.
- If you have a global version of premake4, make sure to use the local library version - ./premake4
- Compile the code using the command
make all
- Note: This will build the debug version of the files by default. For a release build the option is ‘config=release’. To explicitly specify a debug build the option is ‘config=debug’.
Cross-Compiling for ARM Linux
- Install the GNU C and C++ cross-compiler tools on the host machine.
- Open a command prompt/linux shell.
- Navigate to the folder of the library (project) to be compiled.
- Generate the necessary Makefiles by running premake4 using the command:
./premake4 gmake
- To view available options for premake4 use the --help flag with the premake4 command.
- If you have a global version of premake4, make sure to use the local library version - ./premake4
- Compile the code using the command
make --config=debugarm all
- Note: This will build the debug version of the files by default. For a release build the option is ‘config=releasearm’.