coin-or / Ipopt

COIN-OR Interior Point Optimizer IPOPT
https://coin-or.github.io/Ipopt
Other
1.43k stars 284 forks source link

linker errors with Ipopt.lib #74

Closed svigerske closed 5 years ago

svigerske commented 5 years ago

Issue created by migration from Trac.

Original creator: hgassmann

Original creation time: 2008-04-28 15:26:07

Assignee: ipopt-team

Version: 3.3

Just downloaded version 3.4 stable and tried to build OSSolverService with amplsolv and Ipopt (Blas/Lapack/HSL) under MSVS 9. After renaming the different libraries so that there were not four libraries with the same name Ipopt.lib (was that a mistake?) I got the following linker errors:

------ Build started: Project: OSTest, Configuration: Release-SL-stable Win32 ------ Linking... amplsolv.lib(fpinitmt.obj) : error LNK2005: matherr already defined in LIBCMT.lib(matherr.obj) Creating library ......\test\unitTestSL-stable.lib and object ......\test\unitTestSL-stable.exp LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library libOSnl2OSiL.lib(OSnl2osil.obj) : error LNK2019: unresolved external symbol CrtDbgReportW referenced in function "public: char & thiscall std::basic_string<char,struct std::char_traits,class std::allocator >::operator[](unsigned int)" (??A?$basic_string@DU?$char_traits@D@std@``@V?$allocator@D@2@``@std@``@QAEAADI@Z) libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol CrtDbgReportW libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol malloc_dbg referenced in function "void __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char ,int)" (??2@YAPAXIABU_DebugHeapTag_t@std@``@PADH@Z) libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __free_dbg referenced in function "void cdecl operator delete(void ,struct std::_DebugHeapTag_t const &,char ,int)" (??3@YAXPAXABU_DebugHeapTag_t@std@``@PADH@Z) libCoinBlas.lib(xerbla.obj) : error LNK2019: unresolved external symbol _s_stop referenced in function xerbla libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _e_wsfe libCoinLapack.lib(dlamch.obj) : error LNK2019: unresolved external symbol _e_wsfe referenced in function dlamch libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _e_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _e_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _e_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _e_wsfe libCoinBlas.lib(xerbla.obj) : error LNK2001: unresolved external symbol _e_wsfe libCoinHSL.lib(mc19ad.obj) : error LNK2001: unresolved external symbol _e_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _e_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _e_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _do_fio libCoinLapack.lib(dlamch.obj) : error LNK2019: unresolved external symbol _do_fio referenced in function dlamch libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _do_fio libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _do_fio libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _do_fio libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _do_fio libCoinBlas.lib(xerbla.obj) : error LNK2001: unresolved external symbol _do_fio libCoinHSL.lib(mc19ad.obj) : error LNK2001: unresolved external symbol _do_fio libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _do_fio libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _do_fio libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _s_wsfe libCoinLapack.lib(dlamch.obj) : error LNK2019: unresolved external symbol _s_wsfe referenced in function dlamch libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _s_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _s_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _s_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _s_wsfe libCoinBlas.lib(xerbla.obj) : error LNK2001: unresolved external symbol _s_wsfe libCoinHSL.lib(mc19ad.obj) : error LNK2001: unresolved external symbol _s_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _s_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2001: unresolved external symbol _s_wsfe libCoinHSL.lib(ma27ad.obj) : error LNK2019: unresolved external symbol _i_dnnt referenced in function ma27hd libCoinLapack.lib(ilaenv.obj) : error LNK2019: unresolved external symbol _s_cmp referenced in function ilaenv libCoinLapack.lib(ilaenv.obj) : error LNK2019: unresolved external symbol _s_copy referenced in function ilaenv libCoinLapack.lib(dsteqr.obj) : error LNK2019: unresolved external symbol _d_sign referenced in function dsteqr libCoinLapack.lib(dsterf.obj) : error LNK2001: unresolved external symbol _d_sign libCoinLapack.lib(dlarfg.obj) : error LNK2001: unresolved external symbol _d_sign libCoinLapack.lib(dlamch.obj) : error LNK2019: unresolved external symbol _pow_di referenced in function dlamch libCoinLapack.lib(dlamch.obj) : error LNK2001: unresolved external symbol _pow_di libCoinLapack.lib(dlartg.obj) : error LNK2001: unresolved external symbol _pow_di libCoinLapack.lib(iparmq.obj) : error LNK2019: unresolved external symbol _i_nint referenced in function iparmq ......\test\unitTestSL-stable.exe : fatal error LNK1120: 13 unresolved externals Build log was saved at "file://d:\OS-trunk-SL-stable\OS\MSVisualStudio\v8\OSTest\Release-SL-stable\BuildLog.htm" OSTest - 47 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 10 up-to-date, 0 skipped ==========

Any ideas what I am doing wrong?

Thanks a million

gus gassmann

svigerske commented 5 years ago

Comment by @andrea5w created at 2008-05-22 00:12:04

Hi Gus,

Some of those errors seem to come from using different runtime libraries (debug, threaded blablabla) which I don't know about, and it will probably be important to use the same options for OS and Ipopt. But since I'm not using MSVC a lot, I can't help.

The only possibly useful thing I can say is that the symbols _e_wsfe and so on are in the libf2c.lib that you should have compiled at some point (see step 2 in the Ipopt/MSVisualStudio/v8/README.TXT file).

Regards,

Andreas

svigerske commented 5 years ago

Comment by @andrea5w created at 2008-05-22 00:12:04

Changing assignee from ipopt-team to @andrea5w.

svigerske commented 5 years ago

Comment by @andrea5w created at 2008-05-22 00:12:04

Changing status from new to assigned.

svigerske commented 5 years ago

Comment by @andrea5w created at 2008-05-22 00:12:04

Changing type from defect to clarification.

svigerske commented 5 years ago

Comment by @andrea5w created at 2008-06-18 15:42:40

No correspondence for 6 weeks. Closing ticket.

svigerske commented 5 years ago

Comment by @andrea5w created at 2008-06-18 15:42:40

Resolution: worksforme