Set up a Windows development environment for Met.3D

This page describes the steps required to set up a development environment for Met.3D under Windows.

First, install all requirements and clone the Met.3D repository as described in Compile Met.3D from source code: Windows.

Then, install and setup an IDE. We describe setups for these IDEs:

Visual Studio

First, we will explain how to set up Visual Studio for Met.3D, since it was already installed when downloading the C++ compiler.

Open Visual Studio from the start menu.

This will open the Visual Studio start window. There, click Open a folder and navigate to your Met.3D source directory. Visual Studio should now open with the Met.3D project active.

You can run, or re-run cmake from the Project menu at the top. By default, cmake will also auto-run once the configuration changes. This will be shown in the output window at the bottom.

You can select your build configuration at the top below the menu bar. To run it, select Met3D.exe as the startup item. You might need to build Met.3D at least once before though. To do that, go to the Build menu at the top and select Build all. The option is only available, if cmake configuration has finished.

CLion

Download and install CLion from the JetBrains website.

To use CLion with Met.3D, simply open the Met.3D source folder as a project in CLion. If this is the first time you open it, you should be greeted with the Open Project Wizard.

On the toolchains page, remove the MinGW setup, as that is currently not supported. Instead, use the Visual Studio toolchain.

On the next page you will configure the cmake configurations. There will be one default configuration, and two disabled configurations called win-x64-debug and win-x64-release. Remove the default configuration and enable the disabled configurations.

Closing the wizard will configure cmake.

Once that completes, you can select your build and run configuration in the menu bar.

Important

You will not be able to start Met.3D just yet with CLion, as it will not find the Qt plugins. For that edit your run configuration, and add a new environment variable, QT_PLUGIN_PATH. Set its value to PATH_TO_BUILD_DEBUG/vcpkg_installed/x64-windows/debug/Qt6/plugins;PATH_TO_BUILD_RELEASE/vcpkg_installed/x64-windows/Qt6/plugins