-
Notifications
You must be signed in to change notification settings - Fork 1
Building the library
There are 64-bit packages available to download for Ubuntu and Windows. The Windows archives also include a build of the example application iconograph along with the relevant dependencies.
For all other platforms it must be built from source and manually installed.
We use premake5 to generate files for make, but it can also be used to generate project files for a variety of IDEs such as CodeLite, Code::Blocks and Visual Studio. On Ubuntu it can be installed via apt-get, otherwise it should be downloaded and made available on the path.
- libemergent
- FreeImage
- libusb-1.0 (latest downloads including 32-bit and 64-bit libraries for Windows)
Install the libemergent library and then:
$ sudo apt-get install build-essential libusb-1.0-0-dev
$ premake5 gmake
$ make
- Install MinGW and make its "bin" folder available on the path.
- Download the FreeImage Windows binary image.
- Copy the header file to
{path-to-mingw}/include
. - Copy the dll to
{path-to-mingw}/lib
.
- Copy the header file to
- Download the libusb Windows binary image.
- Copy the libusb-1.0 header directory to
{path-to-mingw}/include
. - Copy the appropriate MinGW dll to
{path-to-mingw}/lib
.
- Copy the libusb-1.0 header directory to
- Download libemergent
- Copy the emergent header directory to
{path-to-mingw}/include
.
- Copy the emergent header directory to
> premake5 gmake
> mingw32-make
To build a 64-bit library you will need to install the appropriate version of MinGW and dependencies.
- Copy the FreeImage header to the include folder of libpsinc.
- Copy the libusb-1.0 header directory to the include folder of libpsinc.
- Copy the emergent header directory to the include folder of libpsinc.
> premake5 vs2013
The generated solution can then be opened in Visual Studio, updated to the latest version and then built.
Note: The msvc build will generate a static library since this avoids polluting the headers with
__declspec(dllexport)
and __declspec(dllimport)
.
To build a msvc project that uses libpsinc you must ensure that all of the headers described above can be found and the project must link against psinc.lib, FreeImage.lib and libusb-1.0.lib.
The premake script supports debug/release and x32/x64 configurations when generating visual studio solutions without affecting the standard linux build.