[Ipopt] Help: build hs071_cpp example

max leo correa cordova max-leo-19 at hotmail.com
Thu Jul 9 17:30:54 EDT 2015


Hi,
Thanks for the hint. I have already compiled the code but still have problems when run. I compiled using: 

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 

But when do the run I get this error

max at max-Satellite-C845:~/workspace/Prueba/src$ ./mio
./mio: error while loading shared libraries: libipopt.so.0: cannot open shared object file: No such file or directory

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?
Thanks in advance

Max



> Subject: Re: [Ipopt] Help: build hs071_cpp example
> To: max-leo-19 at hotmail.com; gregmainland at gmail.com; ipopt at list.coin-or.org
> From: stefan at math.hu-berlin.de
> Date: Thu, 9 Jul 2015 16:36:49 +0200
> 
> Hi,
> 
> try with an additional -I/home/max/CoinIpopt/build/include/coin  when 
> you compile the source.
> 
> Stefan
> 
> On 07/09/2015 08:27 AM, max leo correa cordova wrote:
> > Hi,
> > 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:
> >
> > -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
> >
> > 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):
> >
> > max at max-Satellite-C845:~/workspace/Prueba$ g++ -g -Wall hs071_nlp.cpp
> > mio.cpp -o mio -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
> >
> > but i get the error:
> >
> > In file included from hs071_nlp.cpp:9:0:
> > hs071_nlp.hpp:12:22: fatal error: IpTNLP.hpp: No such file or directory
> >   #include "IpTNLP.hpp"
> >                        ^
> > compilation terminated.
> > mio.cpp:2:34: fatal error: IpIpoptApplication.hpp: No such file or directory
> >   #include "IpIpoptApplication.hpp"
> >                                    ^
> > compilation terminated.
> >
> > I was stack here. Please could you give me any hint? I would be so grateful.
> >
> > Max
> >
> >> Subject: Re: [Ipopt] Help: build hs071_cpp example
> >> To: max-leo-19 at hotmail.com; gregmainland at gmail.com; ipopt at list.coin-or.org
> >> From: stefan at math.hu-berlin.de
> >> Date: Thu, 9 Jul 2015 00:03:48 +0200
> >>
> >> Hi,
> >>
> >> did you do a make install in Ipopt before this?
> >> If so, include more information than "it doesn't work".
> >>
> >> Stefan
> >>
> >
> >   		 	   		
> >
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20150709/b0389888/attachment.html>


More information about the Ipopt mailing list