<div dir="ltr">I have everything compiling and running now with a release build!<br><br>In case anyone wants to replicate my steps in the future, :<br>* I changed the target to "Release". Still doing with the Intel C++ compiler.<br>
* In the project properties, set project C/C++/Code Generation/Runtime Library to Multi-threaded (/MT)
where the default was Multi-threaded DLL (/MD) for a release build.<br>* I just needed to link in libipopt.lib<br>* The cpp_example worked.<br><br>As for binaries:<br>* I look forward to the formal distribution of binaries in the future. When they are ready, I can help out with testing. Is this test version significantly out of date?<br>
* Sounds like I need to build my own debug libraries for now. Guess I will have to walk through the build process.<br>* I am not sure how /MT vs. /MD makes a difference and can mix libraries with them.<br>* I don't know much about this stuff, but there may be a way to get a binary that can link to debug as well as release builds. When I link to the intel MKL and intel MPI I am pretty sure I am linking to the same libs for debug as well as release builds. I haven't run into the this problem patching together any other libraries. Mabe this has something to do with /MT vs. /MD. I don't need debugging info about the ipopt library.<br>
* Yeah, distribution of the Intel Fortran libs may not be possible, but I think it is reasonable to ask people to have a license for this installed separately. Especially since it is free for non-commercial on linux.<br>
<br>Thanks for everyone's help on what I now realize is a 101 problem. (And don't worry, the irony of whining about cygwin/linux dev environments and then running into these problems is not lost on me).<br><br><br>
<div class="gmail_quote">On Thu, Aug 21, 2008 at 5:49 PM, Stefan Vigerske <span dir="ltr"><<a href="mailto:stefan@vigerske.de">stefan@vigerske.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
sorry, you seem to get from one pitfall into the next one.<div class="Ih2E3d"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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 in:<br>
<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>
</blockquote>
<br></div>
Yes, the distribution of binaries has not officially started yet, so there are just some test binaries so far.<div class="Ih2E3d"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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>
</blockquote>
<br></div>
>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.<br>
There is a crucial compiler flag that determines whether you link with multithreaded or singlethreaded and optimized ( or debug LIBC libraries.<br>
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 errors.<br>
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.<br>
<br>
Therefore, please make sure that all code and libraries are compiled with the -MT flag.<div class="Ih2E3d"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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 libs<br>
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>
</blockquote>
<br></div>
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.<br>
You can get these libraries at<br>
<a href="http://www.gams.com/%7Esvigerske/intel/win32/10.0/" target="_blank">http://www.gams.com/~svigerske/intel/win32/10.0/</a><br>
Sorry, this is not documented yet and I forgot to mention it before.<br>
There has not been a conclusion yet whether these libraries can be included in the CoinBinary repository.<br>
<br>
Good luck,<br><font color="#888888">
Stefan<br>
</font></blockquote></div><br></div>