[CppAD] tests with ADOLC

Rishi Amrit rishiamrit at gmail.com
Fri Sep 7 19:31:18 EDT 2012


Thanks for your reply. I wrote a small code by modifying the example
get_started.cpp in cppad_ipopt folder. Now I want to compile it. The
makefile in the folder seems pretty complicated and overkill. Could you
please point me to a link to a place where I can find a the correct linkage
and include flags for g++ to compile the example files? I'm sure this
should be possible with one g++ call as long as I have the correct flags
and links. Here is what I am getting right now:



rishi at gandalf:~$ g++ -I/opt/cppad/2012/cppad_ipopt/example
-I/opt/cppad/2012 -I/opt/cppad/2012/cppad_ipopt/src
-I/opt/ipopt/3102/install/include -L/opt/cppad/2012/cppad_ipopt/src
-lcppad_ipopt -L/opt/ipopt/3102/install/lib
-L/usr/lib/gcc/x86_64-linux-gnu/4.6
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu
-L/lib/../lib -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lipopt -llapack -ldl
-lcoinmumps -lpthread -lcoinhsl -lblas -lgfortran -lm -lgcc_s -lquadmath
-lcoinmetis   -L/usr/lib/gcc/x86_64-linux-gnu/4.6
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lgfortran -lm -lquadmath
-lpthread -ldl nlmpc.cpp

/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crt1.o: In
function `_start':
(.text+0x20): undefined reference to `main'
/tmp/cconNijV.o: In function `ipopt_get_started()':
nlmpc.cpp:(.text+0x868): undefined reference to
`cppad_ipopt::cppad_ipopt_nlp::cppad_ipopt_nlp(unsigned long, unsigned
long, CppAD::vector<double> const&, CppAD::vector<double> const&,
CppAD::vector<double> const&, CppAD::vector<double> const&,
CppAD::vector<double> const&, cppad_ipopt::cppad_ipopt_fg_info*,
cppad_ipopt::cppad_ipopt_solution*)'
nlmpc.cpp:(.text+0x899): undefined reference to
`Ipopt::IpoptApplication::IpoptApplication(bool, bool)'
/tmp/cconNijV.o:(.rodata._ZTVN5Ipopt6VectorE[vtable for
Ipopt::Vector]+0xc8): undefined reference to
`Ipopt::Vector::AddTwoVectorsImpl(double, Ipopt::Vector const&, double,
Ipopt::Vector const&, double)'
/tmp/cconNijV.o:(.rodata._ZTVN5Ipopt6VectorE[vtable for
Ipopt::Vector]+0xd0): undefined reference to
`Ipopt::Vector::FracToBoundImpl(Ipopt::Vector const&, double) const'
/tmp/cconNijV.o:(.rodata._ZTVN5Ipopt6VectorE[vtable for
Ipopt::Vector]+0xd8): undefined reference to
`Ipopt::Vector::AddVectorQuotientImpl(double, Ipopt::Vector const&,
Ipopt::Vector const&, double)'
/tmp/cconNijV.o:(.rodata._ZTVN5Ipopt6VectorE[vtable for
Ipopt::Vector]+0xe0): undefined reference to
`Ipopt::Vector::HasValidNumbersImpl() const'
collect2: ld returned 1 exit status
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cppad/attachments/20120907/64787aca/attachment.html>


More information about the CppAD mailing list