Opened 2 years ago

Last modified 14 months ago

#67 new installation issue

"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 (1)

comment:1 Changed 14 months 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

Note: See TracTickets for help on using tickets.