<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Stefan,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for the libCoinUtils fix and the WSMP_FUNC suggestion!</p>
<p class="MsoNormal">Currently, for me none of the Cbc/Clp/Cgl Visual Studio projects build ‘out of the box’—without config.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For WSMP_FUNC, I compared the older stable Clp Visual Studio v10 project, and indeed all such special functions are by default Excluded from the project. I propose the same for the v16 project.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For libCoinUtils, and similar issue with the new xxxLIB_EXPORT, the Visual Studio projects can simply be the plain vanilla builds to work out of the box, without any external components. But for that the sections for xxLIB_EXPORT in the
 relevant config_default.h and config_xxx_default.h need a minor fix: </p>
<p class="MsoNormal" style="margin-left:36.0pt">#ifndef COINUTILSLIB_EXPORT<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">#ifdef _WIN32</p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="background:yellow;mso-highlight:yellow">#ifdef DLL_EXPORT</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">/* assuming we build a CoinUtils DLL */<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">#define COINUTILSLIB_EXPORT __declspec(dllexport)<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">#else<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">#define COINUTILSLIB_EXPORT<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="background:yellow;mso-highlight:yellow">#endif</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">#endif</p>
<p class="MsoNormal" style="margin-left:36.0pt">#endif<o:p></o:p></p>
<p class="MsoNormal">(so use DLL_EXPORT, as in CoinUtilsConfig.h)<o:p></o:p></p>
<p class="MsoNormal">Since all VS projects are set to build Static Lib rather than DLLs.<o:p></o:p></p>
<p class="MsoNormal">Similar fixes can be applied to Cbc (and CbcSolver), Cgl and Clp (and OsiClp).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cbc\src\CbcSolverConfig.h  (ifdef CBCSOLVER_BUILD -> ifdef DLL_EXPORT)<o:p></o:p></p>
<p class="MsoNormal">Cbc\src\config_default.h<o:p></o:p></p>
<p class="MsoNormal">Cbc\src\config_cbc_default.h<o:p></o:p></p>
<p class="MsoNormal">Cgl\src\CglCommon\config_default.h<o:p></o:p></p>
<p class="MsoNormal">Cgl\src\CglCommon\config_cgl_default.h<o:p></o:p></p>
<p class="MsoNormal">Clp\src\config_default.h<o:p></o:p></p>
<p class="MsoNormal">Clp\src\config_clp_default.h<o:p></o:p></p>
<p class="MsoNormal">Clp\src\OsiClp\OsiClpConfig.h (ifdef OSICLP_BUILD -> ifdef DDL_EXPORT)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">If that’s a reasonable approach, I can create some PRs for the above to make all these projects and solutions build using Visual Studio and v16 projects and solutions.<o:p></o:p></p>
<p class="MsoNormal">On the other hand, I might be going the wrong direction..<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks for your help.<o:p></o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jan-Willem<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="border:none;padding:0cm"><b>From: </b><a href="mailto:svigerske@gams.com">Stefan Vigerske</a><br>
<b>Sent: </b>Monday, February 3, 2020 10:58 AM<br>
<b>To: </b><a href="mailto:jhmgoossens@hotmail.com">Jan-Willem Goossens</a>; <a href="mailto:cbc@list.coin-or.org">
cbc@list.coin-or.org</a><br>
<b>Subject: </b>Re: [Cbc] VS 2019 Cbc build problems</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br>
<br>
On 2/2/20 10:09 PM, Jan-Willem Goossens wrote:<br>
> Dear all,<br>
> <br>
> I’m trying to build the latest (master) Cbc using Visual Studio 2019 and the v16 solution, together with the latest master of all relevant related repos (BuildTools, CoinUtils, Cgl, etc., etc.)<br>
> <br>
> First, I encountered an issue loading the Cbc solution, due to a ReleaseParallel configuration, but I think I worked around that.<br>
> Next, libCoinUtils wouldn’t compile, due to a #define COINUTILSLIB_EXPORT was missing.<br>
<br>
This might be fixed now.<br>
<br>
> After that, libClp wouldn’t compile, due unknown WSMP_FUNC in ClpCholeskyWssmp.cpp.<br>
<br>
Then you should add a define for WSMP_FUNC according to the name <br>
mangling scheme that your Wsmp library uses.<br>
That is, if you don't have Wsmp, don't try to build ClpCholeskyWssmp.cpp.<br>
<br>
> By now, I’m wondering what I’m might be doing wrong?<br>
<br>
The main supported buildsystem for CoinUtils, Clp, Cbc, etc is the <br>
autotools-based system, which should work with MS compilers under MSys2 <br>
on Windows, too.<br>
This buildsystem has been updated in the master branches, that is, the <br>
current development versions of CoinUtils, Clp, Cbc, etc., recently, <br>
which also brought some changes to the code itself. This very likely <br>
broke these MSVS project files. Noone looked into fixing these so far.<br>
<br>
Stefan<br>
<br>
> Thank you for any help.<br>
> <br>
> Regards,<br>
> <br>
> Jan-Willem<br>
> (BTW, eliminate root directory was a great move)<br>
> <br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> Cbc mailing list<br>
> Cbc@list.coin-or.org<br>
> <a href="https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist.coin-or.org%2Fmailman%2Flistinfo%2Fcbc&amp;data=02%7C01%7C%7C252b10ff9ac14410d54208d7a88f9260%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637163206895150171&amp;sdata=YuJN%2FsWhaSfqsyXdqxkpqjd%2FzivvMTKEe5zhkc2r6Yc%3D&amp;reserved=0">
https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist.coin-or.org%2Fmailman%2Flistinfo%2Fcbc&amp;data=02%7C01%7C%7C252b10ff9ac14410d54208d7a88f9260%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637163206895150171&amp;sdata=YuJN%2FsWhaSfqsyXdqxkpqjd%2FzivvMTKEe5zhkc2r6Yc%3D&amp;reserved=0</a><br>
> <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>