Skip to content

Commit 307ad9b

Browse files
committed
discuss the console capture issue when mixing debug and release runtimes with MSVC
1 parent 49b3703 commit 307ad9b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

doc/installation.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,16 @@ library must also be compiled with Visual C++ and then either be
471471
selected manually in the ``Preferences`` dialog (plugin mode) or be
472472
linked directly (with ``-D LAMMPS_GUI_USE_PLUGIN=no``).
473473

474+
In addition, LAMMPS-GUI and the LAMMPS shared library must be compiled
475+
with the *same* build configuration, i.e. both as ``Release`` or both as
476+
``Debug`` builds. Debug and Release builds link different, mutually
477+
isolated Visual C++ runtime DLLs (``ucrtbased.dll`` versus
478+
``ucrtbase.dll``), and capturing the LAMMPS screen output only works
479+
when the executable and the library share the same C runtime instance.
480+
With mismatched build configurations, simulations run normally, but the
481+
captured output remains empty because the LAMMPS library writes to the
482+
console of a different C runtime.
483+
474484
*MinGW64 Cross-compiler*
475485

476486
The standard CMake build procedure for cross-compilation can be applied.

0 commit comments

Comments
 (0)