Skip to content

Building on Windows

Felix Johannes Thiel edited this page Apr 16, 2025 · 2 revisions

Building

After cloning the repository and checking out this branch, the submodules need to be initialised and updated. Make sure to do this recursively, since some of the submodules have submodules themselves.

git submodule update --init --recursive

Windows v143

  1. Give set IFCOS_INSTALL_PYTHON=FALSE before running build-deps.cmd.
  2. Make sure to give the build tools with build-deps.cmd, e.g. build-deps.cmd vs2022-x64. Despite the samples, this is not optional.
  3. Give the same tools for run-cmake.bat, and disable python: run-cmake.bat vs2022-x64 -DBUILD_IFCPYTHON=0 -DCOLLADA_SUPPORT=0 -DHDF5_SUPPORT=0

Windows v142

  1. Give set IFCOS_INSTALL_PYTHON=FALSE before running build-deps.cmd
  2. Make sure to give the build tools with build-deps.cmd, e.g. build-deps.cmd vs2019-x64. Despite the samples, this is not optional.
  3. Give the same tools for run-cmake.bat, and disable python: run-cmake.bat vs2019-x64 -DBUILD_IFCPYTHON=0 -DCOLLADA_SUPPORT=0 -DHDF5_SUPPORT=0

If receiving linker errors, replace the Boost environment variables with a 3rd party copy of Boost in run-cmake.bat, e.g.

set BOOST_ROOT=D:\3drepo\bouncer\boost_1_86_0
set BOOST_LIBRARYDIR=D:\3drepo\bouncer\boost_1_86_0\lib64-msvc-14.2

The BOOST variables can also be updated in win/run_cmake.bat.

Prepare Installation for Bouncer

IfcOpenShell comes with its own version of OpenCascade (7.8.1).

INSTALL won't copy the Eigen dependency into the installed /include folder. To remedy that, one can either copy the Eigen dependency into the installed /include folder or add the path to Eigen (from the ifc dependencies) as EIGEN_ROOT in your run_cmake_for_bouncer.bat script, e.g.

set EIGEN_ROOT=C:\Git\IfcOpenShell\_deps-vs2022-x64-installed\Eigen

IFCOS 0.7.0 introduced CGAL, which itself introduces two static dependencies. The FindIFCOPENSHELL module has been updated to also include these libraries (mpfr, mpir), however these must be copied into the IfcOpenShell installation /lib folder on Windows (on Linux, the CMake will search usr/libs which should find the OS versions). The mpfr and mpir folders can be found in the installation folder of the ifc dependencies (e.g. IfcOpenShell\_deps-vs2022-x64-installed) and their contents need to be copied into the aforementioned /lib folder.

Clone this wiki locally