[Coin-ipopt] Problem with Compiling hs071 in IpOpt 3.3.1 till 3.3.3 under VS 2005

Andreas Waechter andreasw at watson.ibm.com
Mon Oct 1 12:25:46 EDT 2007


Hi Tristan,

We had some similar issues in other COIN projects.  It seems that the MS 
compilers are not very happy with mixing objects that have been compiled 
in debug mode and in optimized mode.

By default, the f2c library (vcf2c.lib) is compiled in optimized mode.  I 
assume that you are compiling the Ipopt code in debug mode?

Here my suggestion:

1. Try to see if things work fine if you compile the Ipopt projects also 
in optimized mode (I guess the MS people call it "Release"...).  If that 
works good.

2. If you still want to compile your Ipopt project in Debug mode, you need 
to recompile the vcf2c.lib in debug mode as well.  I recently added some 
comments on this in

https://projects.coin-or.org/BuildTools/browser/stable/0.5/compile_f2c/INSTALL

see lines 28-31 therein.

If this doesn't help, please create a ticket at the Ipopt wiki page.

Thanks

Andreas

On Mon, 1 Oct 2007, Froidure, Tristan A wrote:

>
> Hi All,
>
> I couldn't get to compile the MSVisualStudio v8 project entirely, as
> some libs seems to conflict with each other.
>
> I used VS 2005, and have also VC6 installed.
>
> More precisely, after getting all third party code and having created
> vcf2c.lib, I was able to compile all the libs in the VS project
> (Blas,Lapack,HSL, and finally IpOpt).
>
> However the example couldn't link, and I got:
>
> 1>LINK : fatal error LNK1104: cannot open file 'libc.lib'
>
> As this is usually no big deal, I added libc.lib to : Configuration
> Properties->Linker->Input-> Ignore Specific Library
>
> I then get the following link errors:
>
> 1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of
> other libs; use /NODEFAULTLIB:library
> 1>vcf2c.lib(open.obj) : error LNK2001: unresolved external symbol _errno
> 1>vcf2c.lib(wrtfmt.obj) : error LNK2019: unresolved external symbol
> _errno referenced in function _w_ed
> 1>vcf2c.lib(endfile.obj) : error LNK2001: unresolved external symbol
> _errno
> 1>vcf2c.lib(sfe.obj) : error LNK2001: unresolved external symbol _errno
> 1>vcf2c.lib(fmt.obj) : error LNK2001: unresolved external symbol _errno
> 1>vcf2c.lib(wsfe.obj) : error LNK2001: unresolved external symbol _errno
> 1>vcf2c.lib(err.obj) : error LNK2001: unresolved external symbol _errno
> 1>Release/hs071_cpp.exe : fatal error LNK1120: 1 unresolved externals
>
> Removing LIBCMT is no solution, and gives the same error.
>
> Hence, it seems that the old libs used by  vcf2c.lib and created by
> nmake are conflicting with the new libs used by visual studio.
>
> I compiled vcf2c.lib directly under VS 2005 (and not VC6 or lower), but
> could not get around the conflicts between the C Run Time libraries....
>
> I made sure that all the projects are Multi-Threaded, and really don't
> see what to do from there.
>
> Could anyone help? I have a wonderfull math problem to solve numerically
> and can't wait to go to the best part of the job....
>
>
>
>
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> This message is intended only for the personal and confidential use of the designated recipient(s) named above.  If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited.  This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such.  All information is subject to change without notice.
>
>
>
>
> _______________________________________________
> Coin-ipopt mailing list
> Coin-ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-ipopt
>



More information about the Coin-ipopt mailing list