This file describes how to build Ice for C++ from sources on Windows, and how to test the resulting build.
ZeroC provides Ice binary distributions for various platforms and compilers, including Windows and Visual Studio, so building Ice from sources is usually unnecessary.
Ice was extensively tested using the operating systems and compiler versions listed for our supported platforms.
Ice has dependencies on a number of third-party libraries:
- Berkeley DB 5.3
- bzip 1.0
- expat 2.1
- mcpp 2.7.2 (with patches)
You do not need to build these packages yourself, as ZeroC supplies Nuget packages for all these third party dependencies.
The Ice build system for Windows downloads and installs Nuget and these
Nuget packages when you build Ice for C++. The third-party packages
are installed in the ice/cpp/third-party-packages
folder.
Open a command prompt that is configured for your target architecture. For example, when using Visual Studio 2013, you have several alternatives:
- Developer Command Prompt
- VS2013 x86 Native Tools Command Prompt
- VS2013 x64 Native Tools Command Prompt
- VS2013 x64 Cross Tools Command Prompt
Using the first two configurations produces 32-bit binaries, while the third and fourth configurations produce 64-bit binaries.
In the command window, change to the cpp
subdirectory:
$ cd cpp
Edit config\Make.rules.mak
to establish your build configuration. The comments
in the file provide more information.
Now you're ready to build Ice:
> nmake /f Makefile.mak
This will build the Ice core libraries, services, and tests.
Building Ice for x64 with Visual Studio is like building Ice for x86. You just need to perform the build in an "x64 Command Prompt", and not in a regular "Developer Command Prompt".
Simply run nmake /f Makefile.mak install
. This will install Ice in the
directory specified by the prefix
variable in config\Make.rules.mak
.
If you built a 64-bit version of Ice, the binaries are installed in the
bin\x64
directory and the libraries are installed in the lib\x64
directory.
Python is required to run the test suite. Additionally, the Glacier2 tests
require the Python module passlib
, which you can install with the command:
> pip install passlib
After a successful source build, you can run the tests as follows:
> python allTests.py
If everything worked out, you should see lots of ok
messages. In case of a
failure, the tests abort with failed
.