Tidal Bladed Knowledge Base

C++ runtime and 32/64-bit requirements for creating external DLLs
Category: Bladed Installation and Setup

Problem

Bladed versions affected: all current 4.x versions 

Date of last article update: 21st December 2022

=========================================================================

What versions of the C++ runtime can be used for creating External Controller and External Loads DLLs for Bladed for Windows?

Solution

The Bladed calculation executable on Windows is 32-bit only, which means that all user-developed external DLLs (i.e. External Controller and External Loads DLLs) for use with Bladed must be 32-bit too (NOTE: the Linux version of Bladed is 64-bit.)

The correct version of the Microsoft Visual C++ runtime must be used when compiling DLLs, to ensure compatibility with the Bladed calculation executable (dtbladed.exe) - see guidance below for different versions of Bladed. Compatibility cannot be guaranteed if this guidance is not followed, and may result in simulations failing or producing incorrect results.

Furthermore, DLLs should be compiled as release builds (i.e. they must target the release build of the runtime, and not the debug build). 

** DNV cannot provide support for any issues arising from the guidance in this article not being adhered to. **

Bladed 4.2 and earlier

DLLs should only be compiled using the 32-bit version of v9.0 of the Visual C++ runtime (the default toolset provided in Visual Studio 2008).

Bladed 4.3 to 4.6

DLLs should only be compiled using the 32-bit version of v10.0 of the Visual C++ runtime (the default toolset provided in Visual Studio 2010).

Bladed 4.7 to 4.12

DLLs should only be compiled using the 32-bit version of v12.0 of the Visual C++ runtime (the default toolset provided in Visual Studio 2013).

Bladed 4.13

dtbladed in Bladed 4.13 has been upgraded to use the 32-bit version of v14.3 of the Visual C++ runtime (the default toolset provided in Visual Studio 2022).

For EXTERNAL CONTROLLERS, testing has shown that DLLs built using earlier versions of the Visual C++ runtime (e.g. v12.0) continue to work with the upgraded version of dtbladed in Bladed 4.13. However, it is recommended that all future controllers be built using Visual C++ runtime version 14.3, to reduce the chance of errors from mixing different runtime versions.

For EXTERNAL LOADS DLLs, users who rely on DLLs built using Visual C++ runtime v12.0 or earlier must now rebuild them to target runtime version 14.0 or later before they can be used with Bladed 4.13. The minimum required toolset is available starting in Visual Studio 2015 with runtime version 14.0. However, it is recommended that all external loads DLLs be rebuilt using Visual C++ runtime version 14.3 (the default toolset provided in Visual Studio 2022). If a 14.x runtime version earlier than 14.3 is targeted, ensure the runtime environment for the toolset version in question is installed on the machines where dtbladed is to be run.

=========================================================================

See the following PDF documents for general guidance on createing external DLLs:

- "External Controller User Manual" (which can be found in e.g. "C:\DNV\Bladed 4.12\External Controller")

- "External Loads DLL User Manual" (which can be found in e.g. "C:\DNV\Bladed 4.12\External Loads DLL")





Keywords DLL; C++; runtime; run-time; 32-bit; 64-bit; external; controller; loads