Opened 3 years ago

Closed 4 months ago

#67 closed installation issue (migrated)

"Undefined reference"-error when compiling example project

Reported by: felixp Owned by: ferreau
Priority: normal Milestone:
Component: C++ core Version: 3.2.1
Keywords: Cc:


When running

 g++ -static example1.cpp ../src/BLASReplacement.cpp ../src/LAPACKReplacement.cpp  -I ../include/ -o statically_linked -L ../bin/ -l qpOASES

in the example folder as stated in I get the following error:

../example1.cpp|66|undefined reference to `qpOASES::QProblem::QProblem(int, int, qpOASES::HessianType, qpOASES::BooleanType)'|

the executable examples that were automatically created when executing make run perfectly, though.

Any suggestions?

Kind regards,

Change History (2)

comment:1 Changed 2 years ago by zhaodong


maybe you can run it as following:

g++ example1.cpp -o example1 -I ../include -DUSE_LONG_INTEGERS -L../bin/ -Wl,-R../bin/ -lqpOASES

comment:2 Changed 4 months ago by stefan

  • Resolution set to migrated
  • Status changed from new to closed

This ticket has been migrated to GitHub and will be resolved there:

Note: See TracTickets for help on using tickets.