Building on Windows#
This guide shows how to build a SAMSON Extension on Windows with Microsoft Visual Studio and CMake.
Read it after you have already:
- installed SAMSON and the SAMSON SDK
- generated a new extension workspace with the Extension Generator
- installed the required compiler, CMake, and Qt version
The goal is to open the generated workspace, build the extension, install it into SAMSON, and launch the correct SAMSON executable for either Debug or Release.
Requirements#
If you have not installed the SAMSON SDK yet, complete Installation first.
- CMake 4.0 or newer
- Visual Studio 2026 Community or Professional, or an older supported version such as VS 2022
- Qt 6.10.2 for 64-bit Windows
- Qt Creator if you want to edit
.uiforms
Environment assumptions used in the commands below:
- your extension workspace contains the root
CMakeLists.txt SAMSON_SDK_PATHpoints to your installed SDKQT6_DIRpoints to the matching Qt installation, unless it is already defined in your environment
Configuration of a project in Microsoft Visual Studio#
Once CMake is installed, generating a Visual Studio solution is straightforward.
Open your extension workspace, create or reuse a build folder, then open PowerShell in that folder.

Run the CMake generator command that matches your Visual Studio version:
Note
The -G option selects the CMake generator. Run cmake -h to list the generators available on your machine.
Note
YourSDKPath is the path to your installed SAMSON SDK. By default, SAMSON and its SDK are installed in C:\Users\%USERNAME%\OneAngstrom\.
Note
If QT6_DIR is already defined in your environment, you may not need to pass it explicitly.

If configuration succeeds, you should see a generated .sln file in the build folder.

Open that solution in Visual Studio and confirm that the workspace structure looks correct.

Building step#
The generated solution contains one target per extension plus CMake helper targets.
For normal development:
- choose
Debugwhen writing and debugging code - choose
Releasewhen validating performance or preparing a distribution build - enable the
INSTALLtarget so Visual Studio copies the built extension into SAMSON automatically
To enable installation, open the solution properties and, for both Debug and Release, enable the build checkbox for the INSTALL target in Configuration Properties > Configuration.

Now build either:
- the extension target itself, if you only want to compile
INSTALL, if you want to compile and install in one stepALL_BUILD, if your solution contains multiple extensions and you want to build everything
Checkpoint:
- the build succeeds
- the install step copies the extension into the correct SAMSON directory
Running SAMSON#
The SAMSON executable must match the build configuration of your extension:
Releasebuilds are loaded by theReleaseSAMSON application installationDebugbuilds are loaded by theDebugSAMSON executable that comes with the SDK
Set the extension target, for example SEMyElement, as the Startup Project.
Then open the target properties and set Configuration Properties > Debugging > Command to the correct SAMSON-Core.exe path for each configuration:
Releaseexample:C:\Users\%USERNAME%\OneAngstrom\SAMSON-Application\11.0.0\Binaries\SAMSON-Core.exeDebugexample:C:\Users\%USERNAME%\OneAngstrom\SAMSON-Sdks\11.0.0\SAMSON-Debug\Binaries\SAMSON-Core.exe

Once this is set, the normal loop becomes:
- build the solution or the
INSTALLtarget - press F5 to launch SAMSON under the debugger
- verify that the extension is loaded and visible in SAMSON
Adding files to a SAMSON Extension#
When you add or remove source files, classes, or resources, you need to regenerate the CMake project.
You can do that by:
- running CMake again from the
buildfolder, or - making a small change to the extension
CMakeLists.txtand letting Visual Studio/CMake reconfigure automatically on the next build
Adding new SAMSON Extensions to the project#
If you generate new extensions in the same workspace, the Extension Generator updates the root CMakeLists.txt with ADD_SUBDIRECTORY. The next CMake reconfiguration should pull the new targets into the solution automatically.
Troubleshooting#
- If CMake cannot find Qt, verify
QT6_DIR. - If the extension builds but does not load, check that you launched the SAMSON executable matching the build configuration.
- If the project structure looks incomplete, regenerate the solution from the root
CMakeLists.txt.
If you have questions or run into issues, use the SAMSON Connect Forum or contact us.
Next steps#
- Continue with Developing GUI if the extension exposes widgets.
- Continue with Publishing a SAMSON Extension once the build workflow is stable.