<div dir="ltr">I am trying to get the IPOPT samples running in MSVC or Intel C++ and am running into linking errors.&nbsp; Here are my steps:<br><br>1. Downloading the binaries available on:<a class="ext-link" href="http://www.coin-or.org/download/binary/OS/"><span class="icon">http://www.coin-or.org/download/binary/OS/</span></a>&nbsp; Note that the only binaries in: <a href="http://www.coin-or.org/download/binary/Ipopt/">http://www.coin-or.org/download/binary/Ipopt/</a> &nbsp; are for linux64.<br>
&nbsp;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.&nbsp; Getting a development environment working with an optimizing compiler on cygwin is very difficult).<br>2. The sample program I am getting is from the source in Ipopt-3.4.2.&nbsp; I am trying out the cpp_example.cpp mentioned in: <a href="http://www.coin-or.org/Ipopt/documentation/node32.html">http://www.coin-or.org/Ipopt/documentation/node32.html</a><br>
3. Since the makefile for this is for cygwin, I need to create my own.&nbsp; .<br>&nbsp; a. I first added the 3 source files into a new project<br>&nbsp; b. I ensured that the include path to the headers in the binary distribution and the libraries directory were set properly.<br>
&nbsp; c. I added libipopt.lib to the linker inputs.<br>4. I hit compile.&nbsp; 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.&nbsp; See notes below for some examples of these.<br>
5. To see if it would help, I added the names of the libraries to the &quot;ignore specific library&quot; list in the linker input options.&nbsp; No luck.<br>6. I tried with Intel C++ vs. MSVC.&nbsp; No difference.<br>7. I tried the &quot;no default libs&quot; selection in the project.&nbsp; A million unresolved errors<br>
8. I tried opening the example that came in the binary distribution: called osTestCode.<br>&nbsp; a. Had a different link error for a library that wasn&#39;t in the binary libs directory: 1&gt;LINK : fatal error LNK1181: cannot open input file &#39;libifcorert.lib&#39; <br>
&nbsp; b. That probably is an unrelated error, but why isn&#39;t this in the distribution, and does it have anything to do with the empty IFORT directory in the libs?<br><br>Can anyone help?&nbsp; Below is a subset of the linker output to get the point:<br>
<br>1&gt;------ Rebuild All started: Project: test_etk_coin, Configuration: Debug Win32 ------<br>1&gt;Deleting intermediate files and output files for project &#39;test_etk_coin&#39;, configuration &#39;Debug|Win32&#39;.<br>
1&gt;Compiling with Intel(R) C++ 10.1.020 [IA-32]... (Intel C++ Environment)<br>1&gt;cpp_example.cpp<br>1&gt;MyNLP.cpp<br>1&gt;Compiling manifest to resources... (Microsoft VC++ Environment)<br>1&gt;Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1<br>
1&gt;<br>1&gt;Copyright (C) Microsoft Corporation.&nbsp; All rights reserved.<br>1&gt;<br>1&gt;<br>1&gt;Linking... (Intel C++ Environment)<br>1&gt;xilink: executing &#39;link&#39;<br>1&gt;msvcprtd.lib(MSVCP90D.dll) : error LNK2005: &quot;public: __thiscall std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;(char const *)&quot; (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in libipopt.lib(IpIpoptApplication.obj)<br>
1&gt;msvcprtd.lib(MSVCP90D.dll) : error LNK2005: &quot;public: class std::locale::facet * __thiscall std::locale::facet::_Decref(void)&quot; (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in libipopt.lib(IpIpoptApplication.obj)<br>
1&gt;libcpmt.lib(locale0.obj) : error LNK2005: &quot;void __cdecl _AtModuleExit(void (__cdecl*)(void))&quot; (?_AtModuleExit@@YAXP6AXXZ@Z) already defined in msvcprtd.lib(locale0_implib.obj)<br>....<br>1&gt;libcpmt.lib(xlock.obj) : error LNK2005: &quot;public: __thiscall std::_Lockit::~_Lockit(void)&quot; (??1_Lockit@std@@QAE@XZ) already defined in msvcprtd.lib(MSVCP90D.dll)<br>
1&gt;LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in MSVCRTD.lib(MSVCR90D.dll)<br>1&gt;LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR90D.dll)<br>
1&gt;LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)<br>1&gt;LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)<br>
1&gt;LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR90D.dll)<br><br></div>