From 5ce650382352c1503f40abf08129ada69402af55 Mon Sep 17 00:00:00 2001 From: bitflash-coin Date: Tue, 4 Aug 2026 06:34:32 -0700 Subject: public commit --- src/headless.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/headless.cpp (limited to 'src/headless.cpp') diff --git a/src/headless.cpp b/src/headless.cpp new file mode 100644 index 0000000..3372936 --- /dev/null +++ b/src/headless.cpp @@ -0,0 +1,20 @@ +// Copyright (c) 2026 Bitflash developers +// Distributed under the MIT/X11 software license. +// +// Stand-ins for the handful of symbols the node core expects the GUI to +// provide, so a headless binary can be linked without ImGui, GLFW or OpenGL. +// +// This exists because linking the GUI made the node need libGL at load time +// even when started with -nogui: the dynamic loader resolves everything before +// main() runs, so the flag came far too late. On a clean server -- which is +// where a node most naturally lives -- that is a hard failure with an error +// message about shared libraries and no hint that the program would otherwise +// have worked fine. + +#include "headers_core.h" + +// The GUI uses this to mark itself dirty. With no window to repaint there is +// nothing to do, and the call sites in main.cpp and net.cpp stay unchanged. +void MainFrameRepaint() +{ +} -- cgit v1.2.3