<div dir="ltr">sounds like the linker doesn&#39;t know about the /home/max/CoinIpopt/build/lib directory. You could try adding &quot;-Wl,-rpath,/home/max/CoinIpopt/build/lib&quot; with no quotes t<span style="font-size:13.1999998092651px;line-height:19.7999992370605px">o your g++ call. Or you could try &quot;export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/max/CoinIpopt/build/lib&quot;. Or you could &quot;make install&quot; 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 &lt;<a href="mailto:max-leo-19@hotmail.com">max-leo-19@hotmail.com</a>&gt; 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&#39;t know why this error because libipopt.so.0 is located in the include path /home/max/CoinIpopt/build/lib. Any idea what&#39;s wrong?<br>Thanks in advance<br><br>Max<br><br><br><br><div></div></div></div><div><div dir="ltr"><div>&gt; Subject: Re: [Ipopt] Help: build hs071_cpp example<br>&gt; 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>&gt; 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>&gt; Date: Thu, 9 Jul 2015 16:36:49 +0200</div></div></div><div><div dir="ltr"><div><br>&gt; <br>&gt; Hi,<br>&gt; <br>&gt; try with an additional -I/home/max/CoinIpopt/build/include/coin  when <br>&gt; you compile the source.<br>&gt; <br>&gt; Stefan<br>&gt; <br>&gt; On 07/09/2015 08:27 AM, max leo correa cordova wrote:<br>&gt; &gt; Hi,<br>&gt; &gt; sorry for the lack of infomation. well I have installed Ipopt following the installation instruction. I made the &#39;make&#39;, &#39;make check&#39; and &#39;make install&#39;. Then try the hs071_cpp example using the &#39;Makefile&#39; created duing the installation and all worked fine, the problem was solved. But I want to use Ipopt with other libreries like &#39;openmi&#39; and so I first tried to build the example program from the terminal of linux. I have read the &#39;ipopt_add_libs.txt&#39; file:<br>&gt; &gt;<br>&gt; &gt; -L/home/max/CoinIpopt/build/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8<br>&gt; &gt; -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu<br>&gt; &gt; -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/../lib<br>&gt; &gt; -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../..<br>&gt; &gt; -L/usr/local/lib -lipopt -llapack -ldl -lcoinmumps -lblas -lgfortran -lm<br>&gt; &gt;   -lquadmath -lcoinhsl -lcoinmetis<br>&gt; &gt;<br>&gt; &gt; 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>&gt; &gt;<br>&gt; &gt; max@max-Satellite-C845:~/workspace/Prueba$ g++ -g -Wall hs071_nlp.cpp<br>&gt; &gt; mio.cpp -o mio -L/home/max/CoinIpopt/build/lib<br>&gt; &gt; -L/usr/lib/gcc/x86_64-linux-gnu/4.8<br>&gt; &gt; -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu<br>&gt; &gt; -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/../lib<br>&gt; &gt; -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../..<br>&gt; &gt; -L/usr/local/lib -lipopt -llapack -ldl -lcoinmumps -lblas -lgfortran -lm<br>&gt; &gt;   -lquadmath -lcoinhsl -lcoinmetis<br>&gt; &gt;<br>&gt; &gt; but i get the error:<br>&gt; &gt;<br>&gt; &gt; In file included from hs071_nlp.cpp:9:0:<br>&gt; &gt; hs071_nlp.hpp:12:22: fatal error: IpTNLP.hpp: No such file or directory<br>&gt; &gt;   #include &quot;IpTNLP.hpp&quot;<br>&gt; &gt;                        ^<br>&gt; &gt; compilation terminated.<br>&gt; &gt; mio.cpp:2:34: fatal error: IpIpoptApplication.hpp: No such file or directory<br>&gt; &gt;   #include &quot;IpIpoptApplication.hpp&quot;<br>&gt; &gt;                                    ^<br>&gt; &gt; compilation terminated.<br>&gt; &gt;<br>&gt; &gt; I was stack here. Please could you give me any hint? I would be so grateful.<br>&gt; &gt;<br>&gt; &gt; Max<br>&gt; &gt;<br>&gt; &gt;&gt; Subject: Re: [Ipopt] Help: build hs071_cpp example<br>&gt; &gt;&gt; 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>&gt; &gt;&gt; From: <a href="mailto:stefan@math.hu-berlin.de" target="_blank">stefan@math.hu-berlin.de</a><br>&gt; &gt;&gt; Date: Thu, 9 Jul 2015 00:03:48 +0200<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Hi,<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; did you do a make install in Ipopt before this?<br>&gt; &gt;&gt; If so, include more information than &quot;it doesn&#39;t work&quot;.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Stefan<br>&gt; &gt;&gt;<br>&gt; &gt;<br>&gt; &gt;                                               <br>&gt; &gt;<br>&gt; <br></div></div></div></blockquote></div>