reckfellENGINE

Build a DLL with SCons

Complete SConstruct for a separate extension.

SCons builds the example DLL here, not the engine. Take native_probe.cpp and its descriptor from the complete example, install SCons for your selected Python, and open MSVC x64 Developer PowerShell.

Save SConstruct:

Python
import os
from SCons.Script import ARGUMENTS, Default, Environment, Exit
sdk = ARGUMENTS.get("sdk", "")
if os.name != "nt" or not os.path.isfile(os.path.join(sdk, "include", "reckfellextension_interface.h")):
    print("Use Windows x64 and pass sdk=<installed ExtensionSDK directory>")
    Exit(1)
env = Environment(ENV=dict(os.environ), MSVC_TARGETS=["amd64"],
                  CPPPATH=[os.path.join(sdk, "include")], CXXFLAGS=["/std:c++17", "/EHsc"])
Default(env.SharedLibrary(target="bin/native_probe.windows.x86_64.dll", source="native_probe.cpp"))

Set $Sdk to the installed ExtensionSDK absolute path:

PowerShell
python -m SCons "sdk=$Sdk" -Q

python must refer to an interpreter containing SCons. No module named SCons is not an SDK error. This SConstruct does not accept engine-build options such as platform=windows or target=editor.

Output is bin/native_probe.windows.x86_64.dll. The .dll suffix is explicit: an intermediate dotted name without the correct suffix can be misinterpreted by SharedLibrary. Put the DLL beside the descriptor and verify loading/constants.

Installed SCons, MSVC x64, compilation, and loading were checked. Other compilers/platforms and engine compilation were not.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.