Skip to content

Building Runtime Libraries on Windows

mogemimi edited this page Jun 18, 2017 · 7 revisions

Build requirements

Get the sources

First, acquire the source code and all dependencies by cloning the git repository.

git clone https://github.com/mogemimi/pomdog.git
cd pomdog
git submodule update --init

Please see Download Build Dependencies for more information.

Generating the Visual Studio project

Second, you need to generate the Visual Studio project files (.sln and .vcxproj) using GYP wrapper script:

python tools/gyp.py build/pomdog.gyp -f msvs

Compiling source code with MSBuild

PowerShell

$env:Path += ";${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
MSBuild build.msvs\test\TestApp\TestApp.sln /t:Build /p:Configuration=Release

Git Bash (MinGW)

export PATH="$PATH:/c/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin"
MSBuild.exe build.msvs/build/pomdog.sln -t:Build -p:Configuration=Release

To switch between Debug/Release modes, use the p:Configuration option:

# PowerShell
/p:Configuration=Debug
/p:Configuration=Release
# Git Bash
-p:Configuration=Debug
-p:Configuration=Release

After a complete build, you will find the "libpomdog.lib" file in build\Release (also build\Debug) directory.