Skip to content

Commit 8917655

Browse files
committed
adapt default config to declare dllexport only if DLL_EXPORT is defined
1 parent 8eddc6b commit 8917655

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

src/CbcSolverConfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#endif
5656

5757
#ifndef CBCSOLVERLIB_EXPORT
58-
# ifdef _WIN32
58+
# if defined(_WIN32) && defined(DLL_EXPORT)
5959
# ifdef CBCSOLVER_BUILD
6060
# define CBCSOLVERLIB_EXPORT __declspec(dllexport)
6161
# else
@@ -69,7 +69,7 @@
6969

7070
#endif /* HAVE_CONFIG_H */
7171

72-
#endif /*__CBCCONFIG_H__*/
72+
#endif /*__CBCSOLVERCONFIG_H__*/
7373

7474
/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
7575
*/

src/OsiCbc/OsiCbcConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#else /* HAVE_CONFIG_H */
5050

5151
#ifndef OSICBCLIB_EXPORT
52-
# ifdef _WIN32
52+
# if defined(_WIN32) && defined(DLL_EXPORT)
5353
# ifdef OSILIB_BUILD
5454
# define OSICBCLIB_EXPORT __declspec(dllexport)
5555
# else

src/config_cbc_default.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#define CBC_VERSION_RELEASE 9999
1818

1919
#ifndef CBCLIB_EXPORT
20-
#ifdef _WIN32
21-
/* assuming we link against a CoinUtils DLL */
20+
#if defined(_WIN32) && defined(DLL_EXPORT)
2221
#define CBCLIB_EXPORT __declspec(dllimport)
2322
#else
2423
#define CBCLIB_EXPORT

src/config_default.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
/* include the COIN-OR-wide system specific configure header */
33
#include "configall_system.h"
44

5-
/* this needs to come before the include of config_coinutils_default.h */
5+
/* this needs to come before the include of config_cbc_default.h */
66
#ifndef CBCLIB_EXPORT
7-
#ifdef _WIN32
8-
/* assuming we build a CoinUtils DLL */
7+
#if defined(_WIN32) && defined(DLL_EXPORT)
98
#define CBCLIB_EXPORT __declspec(dllexport)
109
#else
1110
#define CBCLIB_EXPORT

0 commit comments

Comments
 (0)