<div dir="ltr">sounds like the linker doesn't know about the /home/max/CoinIpopt/build/lib directory. You could try adding "-Wl,-rpath,/home/max/CoinIpopt/build/lib" with no quotes t<span style="font-size:13.1999998092651px;line-height:19.7999992370605px">o your g++ call. Or you could try "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/max/CoinIpopt/build/lib". Or you could "make install" ipopt to a standard place the linker knows about.</span></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jul 9, 2015 at 2:30 PM max leo correa cordova <<a href="mailto:max-leo-19@hotmail.com">max-leo-19@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">Hi,<br>Thanks for the hint. I have already compiled the code but still have problems when run. I compiled using: <br><br><font face="Times New Roman,sans-serif">g++ -g -Wall hs071_nlp.cpp mio.cpp -o mio -I/home/max/CoinIpopt/build/include/coin -L/home/max/CoinIpopt/build/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -L/usr/local/lib -lipopt -llapack -ldl -lcoinmumps -lblas -lgfortran -lm -lquadmath -lcoinhsl -lcoinmetis </font><font face="Times New Roman,sans-serif"><br></font><br>But when do the run I get this error<br><br><font face="Times New Roman,sans-serif">max@max-Satellite-C845:~/workspace/Prueba/src$ ./mio</font><font face="Times New Roman,sans-serif"><br></font><font face="Times New Roman,sans-serif">./mio: error while loading shared libraries: libipopt.so.0: cannot open shared object file: No such file or directory</font><br><br>I don't know why this error because libipopt.so.0 is located in the include path /home/max/CoinIpopt/build/lib. Any idea what's wrong?<br>Thanks in advance<br><br>Max<br><br><br><br><div></div></div></div><div><div dir="ltr"><div>> Subject: Re: [Ipopt] Help: build hs071_cpp example<br>> To: <a href="mailto:max-leo-19@hotmail.com" target="_blank">max-leo-19@hotmail.com</a>; <a href="mailto:gregmainland@gmail.com" target="_blank">gregmainland@gmail.com</a>; <a href="mailto:ipopt@list.coin-or.org" target="_blank">ipopt@list.coin-or.org</a><br>> From: <a href="mailto:stefan@math.hu-berlin.de" target="_blank">stefan@math.hu-berlin.de</a><br></div></div></div><div><div dir="ltr"><div>> Date: Thu, 9 Jul 2015 16:36:49 +0200</div></div></div><div><div dir="ltr"><div><br>> <br>> Hi,<br>> <br>> try with an additional -I/home/max/CoinIpopt/build/include/coin when <br>> you compile the source.<br>> <br>> Stefan<br>> <br>> On 07/09/2015 08:27 AM, max leo correa cordova wrote:<br>> > Hi,<br>> > sorry for the lack of infomation. well I have installed Ipopt following the installation instruction. I made the 'make', 'make check' and 'make install'. Then try the hs071_cpp example using the 'Makefile' created duing the installation and all worked fine, the problem was solved. But I want to use Ipopt with other libreries like 'openmi' and so I first tried to build the example program from the terminal of linux. I have read the 'ipopt_add_libs.txt' file:<br>> ><br>> > -L/home/max/CoinIpopt/build/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8<br>> > -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu<br>> > -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/../lib<br>> > -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../..<br>> > -L/usr/local/lib -lipopt -llapack -ldl -lcoinmumps -lblas -lgfortran -lm<br>> > -lquadmath -lcoinhsl -lcoinmetis<br>> ><br>> > and well i create a new folder and the hs071_nlp.hpp, hs071_nlp.cpp, and mio.cpp (main) in ~/workspace/Prueba/ and made the following comand (i am not sure if it is ok):<br>> ><br>> > max@max-Satellite-C845:~/workspace/Prueba$ g++ -g -Wall hs071_nlp.cpp<br>> > mio.cpp -o mio -L/home/max/CoinIpopt/build/lib<br>> > -L/usr/lib/gcc/x86_64-linux-gnu/4.8<br>> > -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu<br>> > -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/../lib<br>> > -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../..<br>> > -L/usr/local/lib -lipopt -llapack -ldl -lcoinmumps -lblas -lgfortran -lm<br>> > -lquadmath -lcoinhsl -lcoinmetis<br>> ><br>> > but i get the error:<br>> ><br>> > In file included from hs071_nlp.cpp:9:0:<br>> > hs071_nlp.hpp:12:22: fatal error: IpTNLP.hpp: No such file or directory<br>> > #include "IpTNLP.hpp"<br>> > ^<br>> > compilation terminated.<br>> > mio.cpp:2:34: fatal error: IpIpoptApplication.hpp: No such file or directory<br>> > #include "IpIpoptApplication.hpp"<br>> > ^<br>> > compilation terminated.<br>> ><br>> > I was stack here. Please could you give me any hint? I would be so grateful.<br>> ><br>> > Max<br>> ><br>> >> Subject: Re: [Ipopt] Help: build hs071_cpp example<br>> >> To: <a href="mailto:max-leo-19@hotmail.com" target="_blank">max-leo-19@hotmail.com</a>; <a href="mailto:gregmainland@gmail.com" target="_blank">gregmainland@gmail.com</a>; <a href="mailto:ipopt@list.coin-or.org" target="_blank">ipopt@list.coin-or.org</a><br>> >> From: <a href="mailto:stefan@math.hu-berlin.de" target="_blank">stefan@math.hu-berlin.de</a><br>> >> Date: Thu, 9 Jul 2015 00:03:48 +0200<br>> >><br>> >> Hi,<br>> >><br>> >> did you do a make install in Ipopt before this?<br>> >> If so, include more information than "it doesn't work".<br>> >><br>> >> Stefan<br>> >><br>> ><br>> >                                           <br>> ><br>> <br></div></div></div></blockquote></div>