<div dir="ltr"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt;If possible, then you should have all libraries build with the same flag, that is all debug, or all multithreaded-dll, or whatever...<br>
&gt;If you build Ipopt with Visual Studio and wanna use MUMPS, then I don&#39;t know how VS will know how to compile this Fortran90 package.<br>
&gt;When you follow the MinGW instruction, you can overwrite compiler flags (CFLAGS, CXXFLAGS, FFLAGS) to make sure that they all use the same -MT/-MTd/... flags. It should be correct already for the &gt;default build (=-MT), but for the debug build I&#39;m not sure.<br>
<font color="#888888">
Stefan</font></blockquote><div><br>Hi guys,&nbsp; See the following linking problems below (going through the
standard steps this time and not doing anything fancy).&nbsp; Should I give MinGW a shot instead of using
the visual studio builds?<br><br>So, to recap:&nbsp; I had the test binaries working with the sample application if I:<br>&nbsp;* Linked to libipopt.lib.&nbsp; That is it.<br>&nbsp;* Set to /MT and didn&#39;t do a debug build.<br>&nbsp;* Compiles and runs no problem, but can&#39;t find any permutation of linking to do a debug build of my own code.&nbsp; So need to go through the build process.<br>
<br>In order to get debug binaries, I got the Ipopt 3.4.2 source:<br>&nbsp;* I followed the exact instructions under the visual studio 8 directory (though I do have visual studio 2008... but I don&#39;t think that is the problem).<br>
&nbsp;* For the linear solver, I followed the instructions that say to use HSL MA27 and MC19 because there aren&#39;t any mumps instructions/files.&nbsp; No ampl/ASL for me.<br>&nbsp;* I got the Netlib LAPACK and BLAS, f2c, etc.<br>&nbsp;* I build the libraries, no problem from instructions... (I can even built a debug and a multithreaded dll /MD release, but I didn&#39;t test these).&nbsp; Note that I am staying in MSVC, not using Intel C++<br>
<br>But....<br>&nbsp;* When I go back to the cpp_example project that worked fine with the distriubuted binaries and unmodified, link it to the new release /MT libipopt.lib which I thought should be identical (expect perhaps HSL instead of mumps?), I run into linking problems.<br>
* First, I assume that I need more than libipopt.lib now and added the following libraries to the linker: &quot;libipopt.lib libcoinHSL.lib vcf2c.lib libcoinlapack.lib libcoinblas.lib&quot;&nbsp; which were the only libraries I could find that were generated in the build<br>
&nbsp; *[[[ As an important sidenote, I am going to use this when I already have MKL linked in for BLAS/LAPACK support, so I tried to link with: &quot;libipopt.lib mkl_intel_c.lib mkl_core.lib mkl_sequential.lib libmmd.lib&nbsp; libCOINHSL.lib vcf2c.lib&quot;.&nbsp; With these I had the exact same unresolved externals as with the libcoinlapack.lib, etc. leading me to believe that we will be able to link in MKL.&nbsp; This is important to ensure no double symbols when I use MKL for other stuff in the same project.&nbsp; Note that this may be a good reason to build libipopt.lib in pieces instead of the library monolith that was distributed in the test binaries ]]]<br>
<br>Here are the unresolved symbols:<br><br>1&gt;libipopt.lib(IpAlgBuilder.obj) : error LNK2001: unresolved external symbol &quot;public: __thiscall Ipopt::RestoPenaltyConvergenceCheck::RestoPenaltyConvergenceCheck(void)&quot; (??0RestoPenaltyConvergenceCheck@Ipopt@@QAE@XZ)<br>
1&gt;libipopt.lib(IpAlgorithmRegOp.obj) : error LNK2001: unresolved external symbol &quot;public: static void __cdecl Ipopt::RestoPenaltyConvergenceCheck::RegisterOptions(class Ipopt::SmartPtr&lt;class Ipopt::RegisteredOptions&gt;)&quot; (?RegisterOptions@RestoPenaltyConvergenceCheck@Ipopt@@SAXV?$SmartPtr@VRegisteredOptions@Ipopt@@@2@@Z)<br>
1&gt;libipopt.lib(IpAlgorithmRegOp.obj) : error LNK2001: unresolved external symbol &quot;public: static void __cdecl Ipopt::RestoConvergenceCheck::RegisterOptions(class Ipopt::SmartPtr&lt;class Ipopt::RegisteredOptions&gt;)&quot; (?RegisterOptions@RestoConvergenceCheck@Ipopt@@SAXV?$SmartPtr@VRegisteredOptions@Ipopt@@@2@@Z)<br>
1&gt;libipopt.lib(IpRestoFilterConvCheck.obj) : error LNK2001: unresolved external symbol &quot;public: __thiscall Ipopt::RestoConvergenceCheck::RestoConvergenceCheck(void)&quot; (??0RestoConvergenceCheck@Ipopt@@QAE@XZ)<br>
1&gt;libipopt.lib(IpRestoFilterConvCheck.obj) : error LNK2001: unresolved external symbol &quot;public: virtual enum Ipopt::ConvergenceCheck::ConvergenceStatus __thiscall Ipopt::RestoConvergenceCheck::CheckConvergence(bool)&quot; (?CheckConvergence@RestoConvergenceCheck@Ipopt@@UAE?AW4ConvergenceStatus@ConvergenceCheck@2@_N@Z)<br>
1&gt;libipopt.lib(IpRestoFilterConvCheck.obj) : error LNK2001: unresolved external symbol &quot;public: virtual __thiscall Ipopt::RestoConvergenceCheck::~RestoConvergenceCheck(void)&quot; (??1RestoConvergenceCheck@Ipopt@@UAE@XZ)<br>
1&gt;libipopt.lib(IpRestoFilterConvCheck.obj) : error LNK2001: unresolved external symbol &quot;public: virtual bool __thiscall Ipopt::RestoConvergenceCheck::InitializeImpl(class Ipopt::OptionsList const &amp;,class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;)&quot; (?InitializeImpl@RestoConvergenceCheck@Ipopt@@UAE_NABVOptionsList@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)<br>
1&gt;C:\working\libraries\etk\examples\test_etk_coin\Release\test_etk_coin.exe : fatal error LNK1120: 7 unresolved externals<br></div></div></div>