[Coin-ipopt] installation problem in ipopt
Stefan Vigerske
stefan at math.hu-berlin.de
Fri Mar 16 08:01:09 EDT 2007
Hi,
woaiquanzhongguo wrote:
> Thank you for your help.I think you are right.I have realized that it would be
> correct to build FortranLinAlg first and then build the ipopt,hs071_cpp. I have
> built the FortranLinAlg and ipopt projects successfully.
> However,I encountered the following errors when building the hs071_cpp:
>
>
> Linking...
> hs071_main.obj : error LNK2019: unresolved external symbol "public: enum Ipopt::ApplicationReturnStatus __thiscall Ipopt::IpoptApplication::OptimizeTNLP(class Ipopt::SmartPtr const &)" (?OptimizeTNLP at IpoptApplication@Ipopt@@QAE?AW4ApplicationReturnStatus at 2@ABV?$SmartPtr at VTNLP@Ipopt@@@2@@Z) referenced in function _main
> hs071_main.obj : error LNK2019: unresolved external symbol "public: void __thiscall Ipopt::IpoptApplication::Initialize(class std::basic_string,class std::allocator >)" (?Initialize at IpoptApplication@Ipopt@@QAEXV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z) referenced in function _main
> hs071_main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Ipopt::OptionsList::SetStringValue(class std::basic_string,class std::allocator > const &,class std::basic_string,class std::allocator > const &,bool,bool)" (?SetStringValue at OptionsList@Ipopt@@QAE_NABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@0_N1 at Z) referenced in function _main
> hs071_main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Ipopt::OptionsList::SetNumericValue(class std::basic_string,class std::allocator > const &,double,bool,bool)" (?SetNumericValue at OptionsList@Ipopt@@QAE_NABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@N_N1 at Z) referenced in function _main
> hs071_main.obj : error LNK2019: unresolved external symbol "public: __thiscall Ipopt::IpoptApplication::IpoptApplication(bool)" (??0IpoptApplication at Ipopt@@QAE at _N@Z) referenced in function _main
> Debug/hs071_cpp.exe : fatal error LNK1120: 5 unresolved externals
>
> I couldn't fix the problem, could you give a solution to this problem?
This looks like you do not link against the ipopt library.
It's difficulty to say without seeing the command line that calls the
linker.
> In addition, I want to ask you three questions:
> 1.Have you never used the hs071_f project during the process of installing ipopt?
Never.
> 2.Could you tell me the build order and which of the seven projects did you
> use when installing ipopt ?
> 3.It seems to me that the Fortran run-time library have been missing ,could you
> give some advice on the settings of the Fortran run-time library in detail?
I never used Visual Studio. For Windows I compiled it in MinGW
(unix-like shell), where one can use the buildsystem that comes with Ipopt.
First HSL, Lapack, and Blas should be build (I guess, that this is
FortranLinAlg), then the ipopt library.
Please also send to the Ipopt-mailing list, so that also Visual Studio
experts can help you on your problems ;-).
Stefan
> 2007-03-16£¬Stefan Vigerske <stefan at vigerske.de> £º
>
> Hi,
>
> > I download the ipopt and third party components. I want to install the ipopt using Visual Studio on Windows, so I have installed Microsoft Visual Studio 2003 .NET , Microsoft Platform SDK and the Intel Visual Fortran Compier 9.0 firstly. I also set the compiling environment regarding to the the Readme file in the folder VisualStudio_dotNET. I found that there are seven projects in the folder VisualStudio_dotNET. According to the project dependencies in the Visual Studio, I think the build order of the seven projects should be hs071_f, ipopt, FortranLinAlg , ScalableProblems, hs071_cpp, hs071_c, CppExample, so I decide to build the hs071_f firstly. However, I encunter the following errors when building the hs071_f ( a Fortran Project):
>
> Maybe I'm wrong, but I don't think that you need hs071_f, it should be
> just an example file. At least, I didn't need it.
> First, you might need FortranLinAlg, if this compiles the Lapack, Blas,
> and HSL code. Then you should try to compile the Ipopt library.
>
> > ------ Build started: Project: hs071_f, Configuration: Debug|Win32 ------ Deleting intermediate files and output files for project 'hs071_f', configuration 'Debug|Win32'.
> > Compiling with Intel Fortran 9.1 C:\ProgramFiles\Intel\Compiler\Fortran\9.1\IA32\...
> > ifort /nologo /Zi /Od /include:"G:\Programe_Files\Microsoft Platform SDK\Core SDK\include" /include:"..\..\..\src\Interfaces" /module:"Debug/" /object:"Debug/" /traceback /check:bounds /libs:static /threads /c /extfor:f /Qvc7.1 /Qlocation,link,"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin" "C:\Program Files\Microsoft Visual Studio .NET 2003\Ipopt\Ipopt\Windows\VisualStudio_dotNET\hs071_f\hs071_f.f"
> > Linking...
> > Link /OUT:"Debug/hs071_f.exe" /INCREMENTAL /NOLOGO /LIBPATH:"G:\Programe_Files\Microsoft Platform SDK\Core SDK\Lib" /LIBPATH:"C:\Program Files\Intel\Compiler\Fortran\9.1\IA32\Lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib" /NODEFAULTLIB /DEBUG /PDB:"Debug/hs071_f.pdb" /SUBSYSTEM:CONSOLE /OPT:NOWIN98 "Debug/hs071_f.obj"
> > Link: executing 'link'
> > hs071_f.obj : error LNK2001: unresolved external symbol __fltused
> > hs071_f.obj : error LNK2019: unresolved external symbol_for_set_reentrancy referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _IPCREATE referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _for_write_seq_lis referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _for_stop_core referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _IPOPENOUTPUTFILE referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _IPADDSTROPTION referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _IPADDINTOPTION referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _IPADDNUMOPTION referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _IPSOLVE referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _for_write_seq_lis_xmit referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _for_emit_diagnostic referenced in function _MAIN__
> > hs071_f.obj : error LNK2019: unresolved external symbol _IPFREE referenced in function _MAIN__
> > LINK : error LNK2001: unresolved external symbol _mainCRTStartup Debug/hs071_f.exe : fatal error LNK1120: 14 unresolved externals
> > hs071_f build failed.
>
> Some of the unresolved symbols (_IP...) are there because there is no
> ipopt library in the linking path.
>
> Stefan
--
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan
More information about the Coin-ipopt
mailing list