<div dir="ltr">Hi everyone,<div><br></div><div>This e-mail is probably directed mostly at Stefan, but if anyone else has an opinion, feel free to weigh in.</div><div><br></div><div>I&#39;m trying to build CoinAll with Visual Studio 9 (we still need to support it because of Python extensions) on a new laptop running Windows 8 that also has Visual Studio 12 installed (yes, I know I&#39;m asking for trouble). For reasons I cannot discern, the compiler is using a combination of the headers from both compiler versions (9 and 12), which may or may not be related to the issues I&#39;m seeing. In a nutshell, code that builds fine on my old laptop now fails to build with the exact same compiler.This has caused me to dig into some stuff that I found does not completely make sense to me.</div><div><br></div><div>The problem arises from the check for the type int64_t in the configure script for CoinUtils, which is done as so.</div><div><br></div><div><div>AC_CHECK_TYPE([int64_t],[CoinInt64=int64_t ; CoinUInt64=uint64_t],[],[</div><div>#ifdef HAVE_CINTTYPES</div><div># include &lt;cinttypes&gt;</div><div>#else</div><div># ifdef HAVE_INTTYPES_H</div><div>#  include &lt;inttypes.h&gt;</div><div># endif</div><div>#endif</div><div>])</div><div><br></div><div>The type int64_t is found at configure time (I think in the header cintypes), but only because the inttypes headers have been manually included for the test. In CoinTypes.hpp, these headers are *not* currently included and thus, the type is not found at compile time, which leads to an error.</div><div><br></div><div>Adding the same block of code from the test above to CoinTypes.hpp fixes the problem for CoinUtils, but building Cbc then fails because the symbols HAVE_CINTTYPES and HAVE_INTTYPES_H are not exported to config_coinutils.h. If I export the symbols</div><div><br></div><div>COINUTILS_HAS_CINTTYPES </div><div>COINUTILS_HAS_INTTYPES_H</div><div><br></div><div>then everything is fine. I have no idea why this was working fine in the recent past and now it suddenly causes a problem or why everything is fine on Linux and OS X. I suppose that type must be found in a different header on those OS&#39;s.</div><div><br></div><div>Now my questions:</div><div><br></div><div>1. Another solution would be to check for the type int64_t without including the headers manually, which would then not require including them in CoinTypes.hpp. We would then just use long long instead of int64_t I suppose. I don&#39;t think this is the right solution, but I wanted to see if anyone had a different opinion. </div><div><br></div><div>2. This all made me realize that we have a block like this in CoinTypes.hpp.</div><div><div><br></div><div>#ifdef COINUTILS_HAS_STDINT_H</div><div>#include &lt;stdint.h&gt;</div><div>#endif</div></div><div><br></div><div>Why do we only check for stdint.h and not cstdint (as we do with inttypes). With the Visual Studio build, it is finding cstdint, not stdint.h, but then not including it. Of course, this is not causing a problem at the moment, but should we also export COINUTILS_HAS_CSTDINT? I haven&#39;t checked for blame, but I&#39;m sure that code was inserted in there to solve some specific issue with finding types on some platform, but I guess that it would be more portable and correct if cstdint were also included when it&#39;s available. </div><div><br></div><div>If you read this far, let me know what you think and sorry for the long and detailed mail!</div><div><br></div><div>Cheers,</div><div><br></div><div>Ted</div><div><br></div>-- <br>Dr. Ted Ralphs<br>Associate Professor, Lehigh University<br>(610) 628-1280<br>ted &#39;at&#39; lehigh &#39;dot&#39; edu<br><a href="http://coral.ie.lehigh.edu/~ted" target="_blank">coral.ie.lehigh.edu/~ted</a><br>
</div></div>