From 5904ac99de4f6dc93d7b0a987764f9b059a31196 Mon Sep 17 00:00:00 2001 From: Steph Kraemer Date: Thu, 13 Nov 2025 15:24:40 -0500 Subject: [PATCH] Fix mingw build #170 --- CMakeLists.txt | 2 ++ src/Helper.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1308e7d2..e753673e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.12) project("dbcppp" VERSION 3.8.0) +add_compile_definitions(DBCPPP_EXPORT) + # CONFIGURATION set(CMAKE_CXX_STANDARD 17) diff --git a/src/Helper.h b/src/Helper.h index 92c35a2e..1e17bb3b 100644 --- a/src/Helper.h +++ b/src/Helper.h @@ -8,7 +8,7 @@ #include "EndianConfig.h" -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__MINGW32__) # include # define bswap_32(x) _byteswap_ulong(x) # define bswap_64(x) _byteswap_uint64(x)