Compile Project Overview
The Compile Project tool builds your SKSE plugins using the xmake build system.
What It Does
- Auto-detects projects in your projects folder
- Configures xmake with your build settings
- Compiles your plugin to a DLL file
- Optionally copies output to your mods folder
Prerequisites
- VS Build Tools installed via Install Toolchain
- xmake installed via Install Toolchain
- A project created via Create Project
Build Options
| Option | Description |
|---|---|
| Project | Select the project to build from the dropdown |
| Configuration | Debug, Release, or RelWithDebInfo |
| Runtime | SE only, AE only, SE + AE (dual), or VR only |
| Clean | Remove previous build artifacts before building |
| Version | Override the version number for this build |
| Description | Override the plugin description for this build |
Header Actions
| Button | Action |
|---|---|
| Compile | Configure and build the project |
| Clean | Remove all build artifacts and configuration files |
| Open | Open the build output folder in file explorer |
| Stop | Stop a running build process |
Build Output
Terminal Output
Build progress and any errors are shown in the terminal panel at the bottom of the window.
Output Location
After a successful build, your DLL is located at:
%PROJECT%/build/%PLATFORM%/%CONFIG%/%PROJECT%.dll
For example:
C:\Dev\Skyrim\projects\MyPlugin\build\windows\x64\release\MyPlugin.dll
Mods Path: If you've configured a Mods Path in Set Paths, the DLL can be automatically copied there after a successful build.
Build Configurations
| Configuration | Description | Use Case |
|---|---|---|
| Debug | No optimization, full debug symbols | Development, debugging with a debugger |
| Release | Full optimization, no debug symbols | Final release builds |
| RelWithDebInfo | Optimization with debug symbols | Profiling, debugging crashes in release |
Recommended Workflow
- Use Debug during active development
- Use RelWithDebInfo for testing performance
- Use Release for final distribution
Runtime Targets
SKSE plugins can target different Skyrim versions:
| Runtime | Description | Game Version |
|---|---|---|
| SE only | Skyrim Special Edition (pre-AE) | 1.5.97 and earlier |
| AE only | Skyrim Anniversary Edition | 1.6.x |
| SE + AE (dual) | Both SE and AE in one plugin | All versions |
| VR only | Skyrim VR | VR version |
Dual Runtime: The "SE + AE (dual)" option creates a plugin that works with both SE and AE versions. This is the recommended choice for maximum compatibility.
xmake Runtime Flags
# SE only
xmake f -m release --skse_runtime=se
# AE only
xmake f -m release --skse_runtime=ae
# Dual (SE + AE)
xmake f -m release --skse_runtime=dual
# VR only
xmake f -m release --skse_runtime=vr
Troubleshooting
Build Fails Immediately
- Ensure VS Build Tools is installed
- Verify
XSE_MSVCTOOLS_ROOTis set in Set Paths - Try running Clean before building
Compiler Errors
- Check the terminal output for specific error messages
- Verify your code compiles correctly
- Ensure all dependencies are present in the project
Linker Errors
- Check for missing libraries
- Verify CommonLibSSE dependencies are configured
- Ensure the correct runtime is selected
xmake Not Found
- Install xmake via Install Toolchain
- Verify
XSE_XMAKE_ROOTis set in Set Paths - Restart ClibDT after installation
MSVC Not Found
- Run
xmake f -cto reset configuration - Verify VS Build Tools installation
- Try:
xmake f --toolchain=msvc
Clean Build Doesn't Help
- Manually delete the
buildfolder in the project - Delete
.xmakefolder in the project - Run
xmake f -cto clear configuration cache
Antivirus Warning: Some antivirus software may flag compiled DLLs. Add your build folders to your antivirus exclusions if you encounter false positives.