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:

Description

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 https://projects.coin-or.org/qpOASES/ticket/31 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,
Felix

Change History (2)

comment:1 Changed 2 years ago by zhaodong

Hello,Felix:

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: https://github.com/coin-or/qpOASES/issues/67

Note: See TracTickets for help on using tickets.