Dependencies
Boost C++
OBJParser relies extensively on Boost Spirit which is a header-only parsing library. It is included as part of the standard Boost collection.
The library is built and tested against Boost v1.60.
OBJParser solutions expect the Boost library to be located at %BOOST_DIR%
environment variable (ie. BOOST_DIR=C:\Boost\boost_1_60_0
such that %BOOST_DIR%\boost\spirit
is valid).
Note: If building OBJParser with support for memory-mapped files (which is recommended due to the significant performance increase), there is a dependency on the Boost Iostreams binary.
A brief guide on building the complete Boost binaries can be found here.
Once built, the binaries are expected under the %BOOST_DIR%\lib
directory. Example:
1 | $(BOOST_DIR)lib\msvc14.0\x86\libbost_iostreams-vc140-mt-gd-160.lib |
Windows
Batch Script
There are two batch files provided to help build OBJParser: msvc_build.bat
and msvc_build_all.bat
.
Envoking msvc_build.bat
will build Debug/Release versions of the library for a given architecture and Visual Studio compiler. This build batch file should be called with the following:
1 | msvc_build.bat ARCH MSVC |
Where,
ARCH
specifies the binary architecture. Valid values: x86
and x64
.
MSVC
specifies the Visual Studio compiler version. Valid values: 120
and 140
.
Example building 32-bit binaries for Visual Studio 2015:
1 | msvc_build.bat x86 140 |
The msvc_build_all.bat
simply build binaries for all supported architectures and Visual Studio versions.
All generated binaries are placed in the bin subfolder.
Visual Studio
Projects and solutions are provided for Visual Studio 2013 and 2015. These can be built and modified as like any other project.