<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi Chuck,<BR>
<BR>
Thanks a lot for the reply. Well, based on your hint I was able to set up a "brute force" procedure (it is indeed very coarse) for new Ipopt projects in MSVS. It goes more or less like that:<BR>
<BR>
<OL style="MARGIN-TOP: 0cm" type=1>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Within the Ipopt solution (Ipopt.sln) add a <B style="mso-bidi-font-weight: normal">New Project</B> creating a <B style="mso-bidi-font-weight: normal">Win32 Console Application</B>. Configure it for an <B style="mso-bidi-font-weight: normal">Empty Project</B>.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></LI>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Add two source C++ (.cpp) codes: one for the <B style="mso-bidi-font-weight: normal">Problem Representation</B> and another for the <B style="mso-bidi-font-weight: normal">Executable</B> (main).<o:p></o:p></FONT></FONT></SPAN></LI>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Add one header (.hpp) for the <B style="mso-bidi-font-weight: normal">Problem Representation</B>.<o:p></o:p></FONT></FONT></SPAN></LI>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Code the two .cpp sources and the .hpp header as described on the Ipopt documentation.<o:p></o:p></FONT></FONT></SPAN></LI>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Right click on the project name and choose <B style="mso-bidi-font-weight: normal">Project Dependencies</B> from the drop-down menu. The dependencies for the project that must be marked are <B style="mso-bidi-font-weight: normal">libCoinBlas</B>, <B style="mso-bidi-font-weight: normal">libCoinHSL</B>, <B style="mso-bidi-font-weight: normal">libCoinLapack</B>, and <B style="mso-bidi-font-weight: normal">libIpopt</B>.<o:p></o:p></FONT></FONT></SPAN></LI>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Right click on the project name again and choose <B style="mso-bidi-font-weight: normal">Properties</B>.<o:p></o:p></FONT></FONT></SPAN></LI>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Under <B style="mso-bidi-font-weight: normal">Configuration Properties</B>, click on <B style="mso-bidi-font-weight: normal">C/C++ -> General</B> and in <B style="mso-bidi-font-weight: normal">Additional Include Directories</B> (on the right panel), paste:<o:p></o:p></FONT></FONT></SPAN></LI></OL>
<P style="MARGIN: 0cm 0cm 10pt 35.4pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri> ..\..\..\..\Ipopt\src\Interfaces;..\..\..\..\Ipopt\src\Common;..\..\..\..\BuildTools\headers;..\..\..\..\Ipopt\src\Algorithm;..\..\..\..\Ipopt\src\LinAlg</FONT></FONT></SPAN></B></P>
<P style="MARGIN: 0cm 0cm 10pt 35.4pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri><o:p></o:p></FONT></FONT></SPAN></B> </P>
<OL style="MARGIN-TOP: 0cm" type=1 start=8>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Under <B style="mso-bidi-font-weight: normal">Configuration Properties</B>, click on <B style="mso-bidi-font-weight: normal">C/C++ -> Code Generation</B> and in <B style="mso-bidi-font-weight: normal">Runtime Library</B> (on the right panel), choose <B style="mso-bidi-font-weight: normal">Multi-threaded (/MT)</B>.<o:p></o:p></FONT></FONT></SPAN></LI>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Under <B style="mso-bidi-font-weight: normal">Configuration Properties</B>, click on <B style="mso-bidi-font-weight: normal">Linker -> General</B> and in <B style="mso-bidi-font-weight: normal">Additional Library Directories</B> (on the right panel), paste <B style="mso-bidi-font-weight: normal">"..\libf2c"</B><o:p></o:p></FONT></FONT></SPAN></LI>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><SPAN style="mso-ansi-language: EN-US" lang=EN-US><FONT size=3><FONT face=Calibri>Under <B style="mso-bidi-font-weight: normal">Configuration Properties</B>, click on <B style="mso-bidi-font-weight: normal">Linker -> Input</B> and in <B style="mso-bidi-font-weight: normal">Additional Dependencies</B> (on the right panel), paste <B style="mso-bidi-font-weight: normal">vcf2c.lib</B><o:p></o:p></FONT></FONT></SPAN></LI>
<LI style="MARGIN: 0cm 0cm 10pt; mso-list: l0 level1 lfo1" class=MsoNormal><FONT size=3><FONT face=Calibri><B style="mso-bidi-font-weight: normal"><SPAN style="mso-ansi-language: EN-US" lang=EN-US>Build</SPAN></B><SPAN style="mso-ansi-language: EN-US" lang=EN-US> the entire solution and then execute the main as <B style="mso-bidi-font-weight: normal">Release</B>.<o:p></o:p></SPAN></FONT></FONT></LI></OL>
Actually, I just looked inside the already compiled Ipopt.sln under the hs071_cpp project. I've tested it on yet another test-bed I found on an IBM report by Andreas Wächter and it worked well, I guess.<BR>
<BR>
Cheers,<BR>
Antonio.<BR>
<BR> <BR>
<HR id=stopSpelling>
Subject: RE: [Ipopt] Compilation of IPOPT library for C++ example in MSVC(Ipopt.sln)<BR>Date: Mon, 12 Apr 2010 12:43:50 -0600<BR>From: cteeter@Suncor.com<BR>To: acbrandaoa@live.com<BR>CC: ipopt@list.coin-or.org<BR><BR>
<STYLE>
.ExternalClass .ecxhmmessage P
{padding-right:0px;padding-left:0px;padding-bottom:0px;padding-top:0px;}
.ExternalClass BODY.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
<DIV dir=ltr align=left><SPAN class=ecx344082618-12042010><FONT color=#0000ff face=Arial>Hi Antonio,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=ecx344082618-12042010><FONT color=#0000ff face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=ecx344082618-12042010><FONT color=#0000ff face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=ecx344082618-12042010><FONT color=#0000ff face=Arial>I noticed the same problem as well, and to fix it, I had to manually add source files (.cpp) to the IPOPT project as needed until the link errors stopped. These files were included in the IPOPT source distribution, but were not part of the VS solution (.sln) file. Although I'm not sure how this file was created in the first place, it is easy in Visual Studio to create a separate project (for example, a win32 console app) to represent your model. Then, you just have to set (the already built) IPOPT.lib as a project dependency which is then linked to your code. However, your project will still need to reference the IPOPT include files in a manner similar to what's done in the VS solution file that's included with IPOPT. To resolve any unresolved external link errors, you will then need to make sure that the needed source file(s) is part of your IPOPT library build. I don't recall having to change any of the include directories to build IPOPT; I just remember having to manually add a few source files.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=ecx344082618-12042010><FONT color=#0000ff face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=ecx344082618-12042010><FONT color=#0000ff face=Arial>Depending on the location of your new Visual Studio project, you may still need to adjust the relative paths for the include directories so the IPOPT header files can be located at compile time.</FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=en-us class=ecxOutlookMessageHeader align=left>
<HR>
<FONT face=Tahoma><B>From:</B> ipopt-bounces@list.coin-or.org [mailto:ipopt-bounces@list.coin-or.org] <B>On Behalf Of </B>Antonio Brandao<BR><B>Sent:</B> Saturday, April 10, 2010 9:02 AM<BR><B>To:</B> ipopt@list.coin-or.org<BR><B>Subject:</B> [Ipopt] Compilation of IPOPT library for C++ example in MSVC(Ipopt.sln)<BR></FONT><BR></DIV>
<DIV></DIV>Hello,<BR><BR>When I try to exactly reproduce from scratch the example that comes with the IPOPT 3.8.0 installation (the one under the v8 subdiretory that has a pre-processed/pre-compiled solution called Ipopt.sln) in MSVC 8.0, I get lot's of unresolved references errors related to the #Include directive, e.g., the compiler seems not to link IpIpoptApplication.hpp and hs_071_nlp.hpp to the solution. I know this might be a very silly question, but how was the solution Ipopt.sln created for MSVC? Was it created using the MSVC itself or Cywin or other program? In other words, how can I create a new IPOPT problem using MSVC such that I do not have to tell MSVC all the Include File dependencies?<BR><BR>Thanks a lot!<BR><BR>Cheers,<BR>Antonio.<BR><BR><BR>
<HR>
Hotmail: Trusted email with powerful SPAM protection. <A href="https://signup.live.com/signup.aspx?id=60969">Sign up now.</A>
<DIV> </DIV>------------------------------------------------------------------------<BR>This email and its contents are private and confidential, for the sole use of the addressees. If you are not an intended recipient, copying, forwarding or other distribution of this email or its contents by any means is prohibited. If you believe that you received this email in error please notify the original sender immediately. <BR><BR>Petro-Canada is a Suncor Energy business.<BR><BR>------------------------<BR><BR>Ce courriel et son contenu sont privés et confidentiels, et sont destinés à l’usage exclusif des destinataires. Si vous n'êtes pas le destinataire prévu, toute reproduction, transfert ou autre forme de diffusion de ce courriel ou de son contenu par quelque moyen que ce soit est interdit. Si vous croyez avoir reçu ce courriel par erreur, veuillez en aviser l'expéditeur original immédiatement. <BR><BR>Petro-Canada est une entreprise de Suncor Énergie.<BR>                                            <br /><hr />Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. <a href='https://signup.live.com/signup.aspx?id=60969' target='_new'>Sign up now.</a></body>
</html>