blob: 7d1d68d15c9d2584af4a6fecf801c2fd3e33243d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From 71ba226accc4532940de37f1e19d316dd82e54f9 Mon Sep 17 00:00:00 2001
From: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Date: Wed, 9 Sep 2015 21:35:16 +0200
Subject: [PATCH] Patch libmodbus to be able to build statically on Windows.
If we build a static lib, neither import nor export needs to
be defined. Linker error LNK2019 (unresolved external symbol).
Change-Id: I0eea45850e807d2326fc3edda8f22d2dd83f0e82
---
src/3rdparty/libmodbus/modbus.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/3rdparty/libmodbus/modbus.h b/src/3rdparty/libmodbus/modbus.h
index 8acfa2c..1075808 100644
--- a/src/3rdparty/libmodbus/modbus.h
+++ b/src/3rdparty/libmodbus/modbus.h
@@ -35,7 +35,9 @@
#include "modbus-version.h"
#if defined(_MSC_VER)
-# if defined(DLLBUILD)
+# if defined(STATICBUILD)
+# define MODBUS_API
+# elif defined(DLLBUILD)
/* define DLLBUILD when building the DLL */
# define MODBUS_API __declspec(dllexport)
# else
--
1.9.5.msysgit.1
|