-
Notifications
You must be signed in to change notification settings - Fork 4
Building
In this guide we build the mod.io NDLL needed to add mod.io functionality into Haxe projects. The NDLL acts as a "glue code" between C and Haxe, you write your functions on C and then you can call them on Haxe by using Haxe's C Foreign Functions Interface. You build the NDLL just like any other shared library on your C++ compiler. Use the corresponding command to build it.
- Haxe: make sure you have installed the latest version of Haxe.
-
hxcpp: after installing haxe install
hxcpp
library by typinghaxelib install hxcpp
on your terminal.
Tested on Visual Studio 16 2019, should work on Visual Studio 2016 too. You will need to install the Visual Studio C++ Redistributable beforehand.
Run the following in the x86 Native Tools Command prompt
:
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -AWin32 ..
cmake --build . --config MinSizeRel
The ndll is now located at bin/MinSizeRel/modioWrapperWindows_x86.ndll
.
Alternatively, open the cmake project through File > Open > CMake...
visual studio and under manage configurations... Add a x86 target and build that.
mkdir build
cd build
cmake -G "Unix Makefiles" ..
cmake --build . --config MinSizeRel
The ndll is now located at bin/modioWrapperLinux_x64.ndll
.
You will get the best experience if you build through clion
mkdir build
cd build
cmake -G "Xcode" ..
Then open the solution generated in build and build it.
The ndll is now located at bin/modioWrapperMacOS.ndll
.