[BuildTools-tickets] [BuildTools] #112: build shared libraries on Windows
BuildTools
coin-trac at coin-or.org
Sat Oct 27 16:55:46 EDT 2018
#112: build shared libraries on Windows
-----------------------------+---------------------------
Reporter: stefan | Owner: stefan
Type: defect | Status: assigned
Priority: major | Component: build system
Version: trunk | Resolution:
Keywords: autotools-update |
-----------------------------+---------------------------
Comment (by stefan):
So, I made some progress on the DLL builds.
I threw out everything Fortran related in configure of !CoinUtils. As
!CoinUtils does not build Fortran code, it should not have to check for a
Fortran compiler. The check for Lapack doesn't assume anymore that the
Lapack library is written in Fortran and so also does not assume anymore
that the name mangling scheme of Fortran would apply to Lapack. Instead,
we now check explicitly what name mangling scheme is used for the Lapack
lib and set a corresponding C macro.
Also AC_COIN_FINALIZE_FLAGS now introduces a XYZ_EXPORT macro that is set
to {{{__declspec(dllimport)}}} if building DLLs. For the build of XYZ
itself, we have to redefine this as {{{__declspec(dllexport)}}}, though
(happens in !CoinUtilsConfig.h).
With that, it seems that a proper !CoinUtils DLL is build and installed.
The !CoinUtils tests manage to build, link, and run against it.
Osi is more of the same, but more complex, because it is not just one lib.
I've set things up for the main !OsiLib and !OsiCommonTestsLib. This seems
to build and link, also using a !CoinUtils DLL.
Someone had the glorious idea a long while ago to declare Osi-dependent
constructors for Coin{Pre|Post}!SolveMatrix in !CoinUtils and implement
them in Osi! Such dirty stuff does not work easily for DLLs due to the
distinction into dllimport and dllexport. So I removed these declarations
from !CoinUtils and made them ordinary C++ functions in !OsiPresolve.
--
Ticket URL: <https://projects.coin-or.org/BuildTools/ticket/112#comment:9>
BuildTools <http://projects.coin-or.org/BuildTools>
Tools for configuring and compiling COIN-OR codes
More information about the BuildTools-tickets
mailing list