[Ipopt] Help with IPOPT linking problems on Windows MSVC/Intel C++
Jesse Perla
jesseperla at gmail.com
Thu Aug 21 17:27:51 EDT 2008
I am trying to get the IPOPT samples running in MSVC or Intel C++ and am
running into linking errors. Here are my steps:
1. Downloading the binaries available on:
http://www.coin-or.org/download/binary/OS/ Note that the only binaries in:
http://www.coin-or.org/download/binary/Ipopt/ are for linux64.
a. (BTW, as a general consideration I would say that people may be
overestimating the applicability of cygwin vs. the native Intel or microsoft
compilers when on windows. Getting a development environment working with
an optimizing compiler on cygwin is very difficult).
2. The sample program I am getting is from the source in Ipopt-3.4.2. I am
trying out the cpp_example.cpp mentioned in:
http://www.coin-or.org/Ipopt/documentation/node32.html
3. Since the makefile for this is for cygwin, I need to create my own. .
a. I first added the 3 source files into a new project
b. I ensured that the include path to the headers in the binary
distribution and the libraries directory were set properly.
c. I added libipopt.lib to the linker inputs.
4. I hit compile. All of the source compiled fine, but when linking, it
stated that a whole bunch of functions were already defined in core
libraries such as: MSVCRTD.lib. See notes below for some examples of these.
5. To see if it would help, I added the names of the libraries to the
"ignore specific library" list in the linker input options. No luck.
6. I tried with Intel C++ vs. MSVC. No difference.
7. I tried the "no default libs" selection in the project. A million
unresolved errors
8. I tried opening the example that came in the binary distribution: called
osTestCode.
a. Had a different link error for a library that wasn't in the binary libs
directory: 1>LINK : fatal error LNK1181: cannot open input file
'libifcorert.lib'
b. That probably is an unrelated error, but why isn't this in the
distribution, and does it have anything to do with the empty IFORT directory
in the libs?
Can anyone help? Below is a subset of the linker output to get the point:
1>------ Rebuild All started: Project: test_etk_coin, Configuration: Debug
Win32 ------
1>Deleting intermediate files and output files for project 'test_etk_coin',
configuration 'Debug|Win32'.
1>Compiling with Intel(R) C++ 10.1.020 [IA-32]... (Intel C++ Environment)
1>cpp_example.cpp
1>MyNLP.cpp
1>Compiling manifest to resources... (Microsoft VC++ Environment)
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>
1>Linking... (Intel C++ Environment)
1>xilink: executing 'link'
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> >::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >(char const *)"
(??0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at PBD@Z)
already defined in libipopt.lib(IpIpoptApplication.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class
std::locale::facet * __thiscall std::locale::facet::_Decref(void)"
(?_Decref at facet@locale at std@@QAEPAV123 at XZ) already defined in
libipopt.lib(IpIpoptApplication.obj)
1>libcpmt.lib(locale0.obj) : error LNK2005: "void __cdecl _AtModuleExit(void
(__cdecl*)(void))" (?_AtModuleExit@@YAXP6AXXZ at Z) already defined in
msvcprtd.lib(locale0_implib.obj)
....
1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall
std::_Lockit::~_Lockit(void)" (??1_Lockit at std@@QAE at XZ) already defined in
msvcprtd.lib(MSVCP90D.dll)
1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in
MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already
defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined
in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined
in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in
MSVCRTD.lib(MSVCR90D.dll)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20080821/eb284da6/attachment.html
More information about the Ipopt
mailing list