[Ipopt] Help with IPOPT linking problems on Windows MSVC/Intel C++
stefan at vigerske.de
Thu Aug 21 17:49:20 EDT 2008
sorry, you seem to get from one pitfall into the next one.
> 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.
Yes, the distribution of binaries has not officially started yet, so
there are just some test binaries so far.
> 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:
> 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
From the output below I would say that you try to link debugging code
with nondebugging code. While this is no problem for every normal
operation system, for Windows this is not a good idea.
There is a crucial compiler flag that determines whether you link with
multithreaded or singlethreaded and optimized ( or debug LIBC libraries.
The default flag in the COIN-OR build system (the one you use in cygwin)
is -MT (multithreaded/optimized). The multithreaded/debug flag would be
-MTD. Mixing these twos gets you these "...already defined..." linker
Note, that the 'D' in MSVCRTD.LIB probably stands for debug-version,
while LIBCMT.lib is the optimized/multithread (=MT) version of the
libc.lib. Thus, linking these together makes trouble.
Therefore, please make sure that all code and libraries are compiled
with the -MT flag.
> 8. I tried opening the example that came in the binary distribution: called
> 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
> 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?
This is because the MUMPS library that comes with the OS binary
distribution is compiled with the Intel Fortran compiler and now depends
on Intel Fortran libraries.
You can get these libraries at
Sorry, this is not documented yet and I forgot to mention it before.
There has not been a conclusion yet whether these libraries can be
included in the CoinBinary repository.
More information about the Ipopt