From 90a69110a2e32e010b8a0cb8f628f31e772a1119 Mon Sep 17 00:00:00 2001 From: Martin Olivier Date: Fri, 26 Jul 2024 16:19:19 +0200 Subject: [PATCH] fix: win and linux build --- src/demangle.cpp | 7 +++++++ src/symbols.cpp | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/demangle.cpp b/src/demangle.cpp index 35b784f..fe1a279 100644 --- a/src/demangle.cpp +++ b/src/demangle.cpp @@ -4,6 +4,12 @@ std::string format_symbol(std::string input); #if (defined(_WIN32) || defined(_WIN64)) +#include +#include +#include + +#pragma comment(lib, "dbghelp.lib") + std::string get_demangled_name(const char *symbol) { char undecorated[MAX_SYM_NAME]; DWORD flags = UNDNAME_COMPLETE | UNDNAME_NO_FUNCTION_RETURNS | UNDNAME_NO_MS_KEYWORDS; @@ -37,6 +43,7 @@ std::string get_demangled_name(const char *symbol) { #else #include +#include std::string get_demangled_name(const char *symbol) { std::string result; diff --git a/src/symbols.cpp b/src/symbols.cpp index fdd48a3..72066a0 100644 --- a/src/symbols.cpp +++ b/src/symbols.cpp @@ -22,11 +22,8 @@ std::string get_demangled_name(const char *symbol); #if (defined(_WIN32) || defined(_WIN64)) #include -#include #include -#pragma comment(lib, "dbghelp.lib") - std::vector get_symbols(HMODULE hModule, bool demangle) { std::vector result;