<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi:<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;">----- Original Message ----<br>From: "ipopt-request@list.coin-or.org" <ipopt-request@list.coin-or.org><br>To: ipopt@list.coin-or.org<br>Sent: Sunday, August 24, 2008 9:30:01 PM<br>Subject: Ipopt Digest, Vol 44, Issue 20<br><br>Hi :<br>I compile using MSVC and Intel Fortran using the configure script under Cygwin.. I created both release and debug versions of the library.<br><br>I now uses the compiled libraries in visual studio. After some experimentation, the following worked for me. For the debug version, I disable MSVCRTD.LIB, MSVCPRTD.LIB and LIBCMT.LIB. For the release version I disable
MSVCRT.LIB and MSVCPRT.LIB.<br><br>Hope this helps.<br><br>Krish<br><br><br><br>
Send Ipopt mailing list submissions to<br> <a ymailto="mailto:ipopt@list.coin-or.org" href="mailto:ipopt@list.coin-or.org">ipopt@list.coin-or.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br> <a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br>or, via email, send a message with subject or body 'help' to<br> <a ymailto="mailto:ipopt-request@list.coin-or.org" href="mailto:ipopt-request@list.coin-or.org">ipopt-request@list.coin-or.org</a><br><br>You can reach the person managing the list at<br> <a ymailto="mailto:ipopt-owner@list.coin-or.org" href="mailto:ipopt-owner@list.coin-or.org">ipopt-owner@list.coin-or.org</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Ipopt digest..."<br><br><br>Today's Topics:<br><br> 1. Re: Help
with IPOPT linking problems on Windows MSVC/Intel<br> C++ (Jesse Perla)<br> 2. Re: Help with IPOPT linking problems on Windows MSVC/Intel<br> C++ (Stefan Vigerske)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Sat, 23 Aug 2008 13:04:10 -0400<br>From: "Jesse Perla" <<a ymailto="mailto:jesseperla@gmail.com" href="mailto:jesseperla@gmail.com">jesseperla@gmail.com</a>><br>Subject: Re: [Ipopt] Help with IPOPT linking problems on Windows<br> MSVC/Intel C++<br>To: "Damien Hocking" <<a ymailto="mailto:damien@khubla.com" href="mailto:damien@khubla.com">damien@khubla.com</a>>, "COIN-IPOPT Mailing List"<br> <<a ymailto="mailto:ipopt@list.coin-or.org" href="mailto:ipopt@list.coin-or.org">ipopt@list.coin-or.org</a>><br>Message-ID:<br> <<a
ymailto="mailto:9b4746990808231004t6c51552ckac46ec3f2d51dc31@mail.gmail.com" href="mailto:9b4746990808231004t6c51552ckac46ec3f2d51dc31@mail.gmail.com">9b4746990808231004t6c51552ckac46ec3f2d51dc31@mail.gmail.com</a>><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Hey guys:<br><br>Based on Damien's suggestion I tried different permutations of nodefaultlib<br>to no avail. I am taking one last crack at linking to this in a debug build<br>before getting into the building world (release is working sufficiently for<br>now I believe)<br> * I changed the /Code Generation/Runtime Library to Multi-threaded Debug<br>(/MTd) from the default dll version<br> * I link to just libipopt.lib (adding in others didn't seem to help).<br> * without setting any /nodefaultlib I get a bunch of duplicates like the<br>following, all mentioned are from libcmt.lib such as:<br>1>LIBCMT.lib(invarg.obj) : error LNK2005: __initp_misc_invarg already<br>defined
in LIBCMTD.lib(invarg.obj)<br>1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined in<br>LIBCMTD.lib(invarg.obj)<br><br> * With setting /NODEFAULTLIB:libcmt I get a bunch of unresolved symbols:<br>1>cpp_example.cpp<br>1>Linking... (Intel C++ Environment)<br>1>xilink: executing 'link'<br>1>libipopt.lib(IpSumMatrix.obj) : error LNK2001: unresolved external symbol<br>__invalid_parameter_noinfo<br>....<br><br> * With setting /NODEFAULTLIB:libcmtd I get 4 unresolved symbols:<br>1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other<br>libs; use /NODEFAULTLIB:library<br>1>libcpmtd.lib(stdthrow.obj) : error LNK2019: unresolved external symbol<br>__CrtDbgReportW referenced in function "void __cdecl<br>std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)"<br>(?_Debug_message@std@@YAXPB_W0I@Z)<br>1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol<br>__malloc_dbg
referenced in function "void * __cdecl operator new(unsigned<br>int,struct std::_DebugHeapTag_t const &,char *,int)"<br>(??2@YAPAXIABU_DebugHeapTag_t@std@@PADH@Z)<br>1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol<br>__free_dbg referenced in function "void __cdecl operator delete(void<br>*,struct std::_DebugHeapTag_t const &,char *,int)"<br>(??3@YAXPAXABU_DebugHeapTag_t@std@@PADH@Z)<br>1>libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol<br>__calloc_dbg referenced in function __Getctype<br>1>C:\working\libraries\etk\examples\test_etk_coin\Debug/test_etk_coin.exe :<br>fatal error LNK1120: 4 unresolved externals<br><br>* With Setting /NODEFAULTLIB:libcmt and then /NODEFAULTLIB:libcmtd (or a<br>superset of those) I get an enormous number of unresolved symbols<br><br>If anyone has any last minute suggestions on a permuation, I would love to<br>give it a shot. Otherwise, do you suggest I try
to make the windows<br>binaries with Visual Studio or MingGW instructions? Which do you think is<br>easier to get working for building the 4 permutations of builds<br>(debug/release and multithreaded/multithreaded-dll)? Also, do you expect<br>that I will have trouble with the multi-threaded dll build? I am using /MDd<br>for my other libraries and am worried I may run into the opposite problem<br>changing those over.<br><br><br>On Thu, Aug 21, 2008 at 5:40 PM, Damien Hocking <<a ymailto="mailto:damien@khubla.com" href="mailto:damien@khubla.com">damien@khubla.com</a>> wrote:<br><br>> Ye olde duplicate symbols. MS has 2 sets of libraries that supply C/C++<br>> runtimes. You might need to specify exactly which libs you don't want as<br>> part of the project extra command-line options.<br>><br>><br>><br>> /NODEFAULTLIB:libcmt /NODEFAULTLIB:libcmtd /NODEFAULTLIB:libcpmt<br>>
/NODEFAULTLIB:libcpmtd will remove the libc threaded and unthreaded debug<br>> and release libs deom your build, and it should then just use the msvcrt<br>> runtimes.<br>><br>><br>><br>> Libifcorert.lib is an Intel Fortran runtime that comes with the compiler.<br>><br>><br>><br>> Damien<br>> ------------------------------<br>><br>> *From:* <a ymailto="mailto:ipopt-bounces@list.coin-or.org" href="mailto:ipopt-bounces@list.coin-or.org">ipopt-bounces@list.coin-or.org</a> [mailto:<br>> <a ymailto="mailto:ipopt-bounces@list.coin-or.org" href="mailto:ipopt-bounces@list.coin-or.org">ipopt-bounces@list.coin-or.org</a>] *On Behalf Of *Jesse Perla<br>> *Sent:* Thursday, August 21, 2008 3:28 PM<br>> *To:* COIN-IPOPT Mailing List<br>> *Subject:* [Ipopt] Help with IPOPT linking problems on Windows MSVC/Intel<br>> C++<br>><br>><br>><br>> I am trying to get the IPOPT samples running in MSVC or
Intel C++ and am<br>> running into linking errors. Here are my steps:<br>><br>> 1. Downloading the binaries available on:<br>> <a href="http://www.coin-or.org/download/binary/OS/" target="_blank">http://www.coin-or.org/download/binary/OS/</a> Note that the only binaries<br>> in: <a href="http://www.coin-or.org/download/binary/Ipopt/" target="_blank">http://www.coin-or.org/download/binary/Ipopt/</a> are for linux64.<br>> a. (BTW, as a general consideration I would say that people may be<br>> overestimating the applicability of cygwin vs. the native Intel or microsoft<br>> compilers when on windows. Getting a development environment working with<br>> 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. I am<br>> trying out the cpp_example.cpp mentioned in:<br>> <a
href="http://www.coin-or.org/Ipopt/documentation/node32.html" target="_blank">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. .<br>> a. I first added the 3 source files into a new project<br>> b. I ensured that the include path to the headers in the binary<br>> distribution and the libraries directory were set properly.<br>> c. I added libipopt.lib to the linker inputs.<br>> 4. I hit compile. All of the source compiled fine, but when linking, it<br>> stated that a whole bunch of functions were already defined in core<br>> libraries such as: MSVCRTD.lib. 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<br>> "ignore specific library" list in the linker input options. No luck.<br>> 6. I tried with Intel C++ vs. MSVC. No
difference.<br>> 7. I tried the "no default libs" selection in the project. A million<br>> unresolved errors<br>> 8. I tried opening the example that came in the binary distribution: called<br>> osTestCode.<br>> a. Had a different link error for a library that wasn't in the binary<br>> libs directory: 1>LINK : fatal error LNK1181: cannot open input file<br>> 'libifcorert.lib'<br>> b. That probably is an unrelated error, but why isn't this in the<br>> distribution, and does it have anything to do with the empty IFORT directory<br>> in the libs?<br>><br>> Can anyone help? Below is a subset of the linker output to get the point:<br>><br>> 1>------ Rebuild All started: Project: test_etk_coin, Configuration: Debug<br>> Win32 ------<br>> 1>Deleting intermediate files and output files for project 'test_etk_coin',<br>> configuration 'Debug|Win32'.<br>> 1>Compiling with
Intel(R) C++ 10.1.020 [IA-32]... (Intel C++ Environment)<br>> 1>cpp_example.cpp<br>> 1>MyNLP.cpp<br>> 1>Compiling manifest to resources... (Microsoft VC++ Environment)<br>> 1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1<br>> 1><br>> 1>Copyright (C) Microsoft Corporation. All rights reserved.<br>> 1><br>> 1><br>> 1>Linking... (Intel C++ Environment)<br>> 1>xilink: executing 'link'<br>> 1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall<br>> std::basic_string<char,struct std::char_traits<char>,class<br>> std::allocator<char> >::basic_string<char,struct<br>> std::char_traits<char>,class std::allocator<char> >(char const *)"<br>> (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z)<br>> already defined in libipopt.lib(IpIpoptApplication.obj)<br>> 1>msvcprtd.lib(MSVCP90D.dll)
: error LNK2005: "public: class<br>> std::locale::facet * __thiscall std::locale::facet::_Decref(void)"<br>> (?_Decref@facet@locale@std@@QAEPAV123@XZ) already defined in<br>> libipopt.lib(IpIpoptApplication.obj)<br>> 1>libcpmt.lib(locale0.obj) : error LNK2005: "void __cdecl<br>> _AtModuleExit(void (__cdecl*)(void))" (?_AtModuleExit@@YAXP6AXXZ@Z)<br>> already defined in msvcprtd.lib(locale0_implib.obj)<br>> ....<br>> 1>libcpmt.lib(xlock.obj) : error LNK2005: "public: __thiscall<br>> std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in<br>> msvcprtd.lib(MSVCP90D.dll)<br>> 1>LIBCMT.lib(invarg.obj) : error LNK2005: __invoke_watson already defined<br>> in MSVCRTD.lib(MSVCR90D.dll)<br>> 1>LIBCMT.lib(setlocal.obj) : error LNK2005: __configthreadlocale already<br>> defined in MSVCRTD.lib(MSVCR90D.dll)<br>> 1>LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already<br>>
defined in MSVCRTD.lib(MSVCR90D.dll)<br>> 1>LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already<br>> defined in MSVCRTD.lib(MSVCR90D.dll)<br>> 1>LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in<br>> MSVCRTD.lib(MSVCR90D.dll)<br>><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://list.coin-or.org/pipermail/ipopt/attachments/20080823/5675af8b/attachment-0001.html" target="_blank">http://list.coin-or.org/pipermail/ipopt/attachments/20080823/5675af8b/attachment-0001.html</a> <br><br>------------------------------<br><br>Message: 2<br>Date: Sat, 23 Aug 2008 19:53:43 +0200<br>From: Stefan Vigerske <<a ymailto="mailto:stefan@vigerske.de" href="mailto:stefan@vigerske.de">stefan@vigerske.de</a>><br>Subject: Re: [Ipopt] Help with IPOPT linking problems on Windows<br> MSVC/Intel C++<br>To: <a
ymailto="mailto:ipopt@list.coin-or.org" href="mailto:ipopt@list.coin-or.org">ipopt@list.coin-or.org</a><br>Cc: Jesse Perla <<a ymailto="mailto:jesseperla@gmail.com" href="mailto:jesseperla@gmail.com">jesseperla@gmail.com</a>><br>Message-ID: <<a ymailto="mailto:48B04EA7.50507@vigerske.de" href="mailto:48B04EA7.50507@vigerske.de">48B04EA7.50507@vigerske.de</a>><br>Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br><br>Hi,<br><br>> Based on Damien's suggestion I tried different permutations of nodefaultlib<br>> to no avail. I am taking one last crack at linking to this in a debug build<br>> before getting into the building world (release is working sufficiently for<br>> now I believe)<br>> * I changed the /Code Generation/Runtime Library to Multi-threaded Debug<br>> (/MTd) from the default dll version<br>> * I link to just libipopt.lib (adding in others didn't seem to help).<br><br>I lost
track already. How was that one build, multithreaded or <br>multithreaded-debug?<br><br>> If anyone has any last minute suggestions on a permuation, I would love to<br>> give it a shot. Otherwise, do you suggest I try to make the windows<br>> binaries with Visual Studio or MingGW instructions? Which do you think is<br>> easier to get working for building the 4 permutations of builds<br>> (debug/release and multithreaded/multithreaded-dll)? Also, do you expect<br>> that I will have trouble with the multi-threaded dll build? I am using /MDd<br>> for my other libraries and am worried I may run into the opposite problem<br>> changing those over.<br><br>If possible, then you should have all libraries build with the same <br>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 <br>know how VS will know how to compile this
Fortran90 package.<br>When you follow the MinGW instruction, you can overwrite compiler flags <br>(CFLAGS, CXXFLAGS, FFLAGS) to make sure that they all use the same <br>-MT/-MTd/... flags. It should be correct already for the default build <br>(=-MT), but for the debug build I'm not sure.<br><br>Stefan<br><br><br>------------------------------<br><br>_______________________________________________<br>Ipopt mailing list<br><a ymailto="mailto:Ipopt@list.coin-or.org" href="mailto:Ipopt@list.coin-or.org">Ipopt@list.coin-or.org</a><br><a href="http://list.coin-or.org/mailman/listinfo/ipopt" target="_blank">http://list.coin-or.org/mailman/listinfo/ipopt</a><br><br><br>End of Ipopt Digest, Vol 44, Issue 20<br>*************************************<br></div></div></div><br>
</body></html>