Skip to content

Commit 0ed310c

Browse files
committed
Fix dll export on macos
1 parent dd7883c commit 0ed310c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

thirdparty/notes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
For CPPAD, remember to change `# define CPPAD_C_COMPILER_MSVC_FLAGS 0` in `cppad/include/configure.hpp`
2+
3+
For IPOPT, remember to mask `IPOPTLIB_EXPORT` in `solvers/ipopt/IpoptConfig.h`

thirdparty/solvers/ipopt/IpoptConfig.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
/* Define to 1 if Ipopt index type is int64_t */
2929
/* #undef IPOPT_INT64 */
3030

31+
#ifdef _MSC_VER
32+
3133
/* Library Visibility Attribute */
3234
#define IPOPTAMPLINTERFACELIB_EXPORT __declspec(dllimport)
3335

@@ -37,6 +39,14 @@
3739
/* Library Visibility Attribute */
3840
#define SIPOPTLIB_EXPORT __declspec(dllimport)
3941

42+
#else
43+
44+
#define IPOPTAMPLINTERFACELIB_EXPORT
45+
#define IPOPTLIB_EXPORT
46+
#define SIPOPTLIB_EXPORT
47+
48+
#endif
49+
4050
/** type corresponding to integers in Fortran
4151
* @deprecated Use ipindex instead.
4252
*/

0 commit comments

Comments
 (0)