<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;">>If possible, then you should have all libraries build with the same flag, that is all debug, or all multithreaded-dll, or whatever...<br>
>If you build Ipopt with Visual Studio and wanna use MUMPS, then I don't know how VS will know how to compile this Fortran90 package.<br>
>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 >default build (=-MT), but for the debug build I'm not sure.<br>
<font color="#888888">
Stefan</font></blockquote><div><br>Hi guys, See the following linking problems below (going through the
standard steps this time and not doing anything fancy). Should I give MinGW a shot instead of using
the visual studio builds?<br><br>So, to recap: I had the test binaries working with the sample application if I:<br> * Linked to libipopt.lib. That is it.<br> * Set to /MT and didn't do a debug build.<br> * Compiles and runs no problem, but can't find any permutation of linking to do a debug build of my own code. 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> * I followed the exact instructions under the visual studio 8 directory (though I do have visual studio 2008... but I don't think that is the problem).<br>
* For the linear solver, I followed the instructions that say to use HSL MA27 and MC19 because there aren't any mumps instructions/files. No ampl/ASL for me.<br> * I got the Netlib LAPACK and BLAS, f2c, etc.<br> * I build the libraries, no problem from instructions... (I can even built a debug and a multithreaded dll /MD release, but I didn't test these). Note that I am staying in MSVC, not using Intel C++<br>
<br>But....<br> * 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: "libipopt.lib libcoinHSL.lib vcf2c.lib libcoinlapack.lib libcoinblas.lib" which were the only libraries I could find that were generated in the build<br>
*[[[ 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: "libipopt.lib mkl_intel_c.lib mkl_core.lib mkl_sequential.lib libmmd.lib libCOINHSL.lib vcf2c.lib". 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. This is important to ensure no double symbols when I use MKL for other stuff in the same project. 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>libipopt.lib(IpAlgBuilder.obj) : error LNK2001: unresolved external symbol "public: __thiscall Ipopt::RestoPenaltyConvergenceCheck::RestoPenaltyConvergenceCheck(void)" (??0RestoPenaltyConvergenceCheck@Ipopt@@QAE@XZ)<br>
1>libipopt.lib(IpAlgorithmRegOp.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl Ipopt::RestoPenaltyConvergenceCheck::RegisterOptions(class Ipopt::SmartPtr<class Ipopt::RegisteredOptions>)" (?RegisterOptions@RestoPenaltyConvergenceCheck@Ipopt@@SAXV?$SmartPtr@VRegisteredOptions@Ipopt@@@2@@Z)<br>
1>libipopt.lib(IpAlgorithmRegOp.obj) : error LNK2001: unresolved external symbol "public: static void __cdecl Ipopt::RestoConvergenceCheck::RegisterOptions(class Ipopt::SmartPtr<class Ipopt::RegisteredOptions>)" (?RegisterOptions@RestoConvergenceCheck@Ipopt@@SAXV?$SmartPtr@VRegisteredOptions@Ipopt@@@2@@Z)<br>
1>libipopt.lib(IpRestoFilterConvCheck.obj) : error LNK2001: unresolved external symbol "public: __thiscall Ipopt::RestoConvergenceCheck::RestoConvergenceCheck(void)" (??0RestoConvergenceCheck@Ipopt@@QAE@XZ)<br>
1>libipopt.lib(IpRestoFilterConvCheck.obj) : error LNK2001: unresolved external symbol "public: virtual enum Ipopt::ConvergenceCheck::ConvergenceStatus __thiscall Ipopt::RestoConvergenceCheck::CheckConvergence(bool)" (?CheckConvergence@RestoConvergenceCheck@Ipopt@@UAE?AW4ConvergenceStatus@ConvergenceCheck@2@_N@Z)<br>
1>libipopt.lib(IpRestoFilterConvCheck.obj) : error LNK2001: unresolved external symbol "public: virtual __thiscall Ipopt::RestoConvergenceCheck::~RestoConvergenceCheck(void)" (??1RestoConvergenceCheck@Ipopt@@UAE@XZ)<br>
1>libipopt.lib(IpRestoFilterConvCheck.obj) : error LNK2001: unresolved external symbol "public: virtual bool __thiscall Ipopt::RestoConvergenceCheck::InitializeImpl(class Ipopt::OptionsList const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?InitializeImpl@RestoConvergenceCheck@Ipopt@@UAE_NABVOptionsList@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)<br>
1>C:\working\libraries\etk\examples\test_etk_coin\Release\test_etk_coin.exe : fatal error LNK1120: 7 unresolved externals<br></div></div></div>