Opened 2 years ago

Closed 4 months ago

#84 closed installation issue (migrated)

Error on mex-compiling qpoases for Matlab; Fix provided

Reported by: lkazaz Owned by: ferreau
Priority: normal Milestone: Release 3.3
Component: Matlab interface Version: 3.2.1
Keywords: lapack, missing, library, linker Cc:


running make.m
gives a linker error as follows:

Error using mex
/tmp/mex_3570552951384630_11260/qpOASES.o: In function
qpOASES.cpp:(.text+0xc289): undefined reference to `dpotrf_'
/tmp/mex_3570552951384630_11260/qpOASES.o: In function
qpOASES.cpp:(.text+0x16cf6): undefined reference to `dpotrf_'
/tmp/mex_3570552951384630_11260/qpOASES.o: In function
qpOASES.cpp:(.text+0x3034e): undefined reference to `dtrcon_'
/tmp/mex_3570552951384630_11260/qpOASES.o: In function
`qpOASES::SQProblemSchur::backsolveSchurQR(long, double const*, long,
qpOASES.cpp:(.text+0x304db): undefined reference to `dtrtrs_'
collect2: error: ld returned 1 exit status 

Solution: Add to the libs. The fix is changing make.m line 72 to

CPPFLAGS = [ CPPFLAGS, '-DLINUX -lmwblas -lmwlapack',' ' ];

See for the make.m file.

Change History (2)

comment:1 Changed 2 years ago by lkazaz

Note, this likely solves Ticket #63 as well.

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.