0

I am trying to use the QuadProg++ library for the first time. I have followed all the instructions for installation. I also have Boost on my system. When I try to compile the main.cc file, which contains an example which solves a sample quadratic optimization problem, I get the following error:

/tmp/ccgZ8Yma.o: In function `main':
main.cc:(.text+0x693): undefined reference to
'QuadProgPP::solve_quadprog(QuadProgPP::Matrix<double>&,
QuadProgPP::Vector<double>&, QuadProgPP::Matrix<double> const&, 
QuadProgPP::Vector<double> const&, QuadProgPP::Matrix<double>
const&, QuadProgPP::Vector<double> const&, QuadProgPP::Vector<double>&)'

collect2: ld returned 1 exit status

If someone has already used this library, then I would be really grateful if you could provide me with any insights. I haven't really started working with this library, so if you can suggest a good library which provides quadratic programming solver, compatible with C++, that will be great too.

alpha_ulrich
  • 536
  • 5
  • 21
  • You do *link* with the library? Please show the command(s) you use to build and link your program. And please remove the C tag, it's not applicable. – Some programmer dude Oct 05 '14 at 20:47
  • show the command you are compiling with? And what compiler? this is almost certainly caused by not specifying the libraries the executible needs to link against. – camelccc Oct 05 '14 at 20:49
  • Thanks a lot for such fast response. Yes, the problem was that I was not specifying the libraries to link with. I thought the #include took care of that. This is the first time I am using an external library in C++. How to I set the status of this question as resolved? – alpha_ulrich Oct 05 '14 at 21:17

0 Answers0