From: julie Wu on
Hi,
I am trying to compile a program (SDPAM) which has the makefile

MEX=mex
SDPASRCS=rsdpa_lib.cpp rsdpa_tool.cpp rsdpa_algebra.cpp \
rsdpa_struct.cpp rsdpa_parts.cpp rsdpa_io.cpp rsdpa_dpotrf.cpp
LAPACK_D=-D_MATLAB_LAPACK
MEXFILES=mexsdpa

all: mexsdpa

mexsdpa:
$(MEX) CXXOPTIMFLAGS='-O3 -DNDEBUG' $(LAPACK_D) -O \
mexsdpa.cpp $(SDPASRCS) -I./
....

This probably worked on a previous version of Matlab, but does not work on my version (R2009a) on Linux.

This is what happens when I run the Makefile
phoenix 106-> make
/opt/local/bin/mex CXXOPTIMFLAGS='-O3 -DNDEBUG' -D_MATLAB_LAPACK -O \
mexsdpa.cpp rsdpa_lib.cpp rsdpa_tool.cpp rsdpa_algebra.cpp rsdpa_struct.cpp rsdpa_parts.cpp rsdpa_io.cpp rsdpa_dpotrf.cpp -lmwlapack -I./
rsdpa_algebra.o: In function `rAl::rdpotf2_(char*, int*, double*, int*, int*)':
rsdpa_algebra.cpp:(.text+0x10a): undefined reference to `ddot_'
rsdpa_algebra.cpp:(.text+0x219): undefined reference to `dgemv_'
rsdpa_algebra.cpp:(.text+0x254): undefined reference to `dscal_'
rsdpa_algebra.o: In function `rAl::rdpotrf_(char*, int*, double*, int*, int*)':
rsdpa_algebra.cpp:(.text+0x3d7): undefined reference to `dsyrk_'
rsdpa_algebra.cpp:(.text+0x4a3): undefined reference to `dgemm_'
....
rsdpa_dpotrf.cpp:(.text+0x44d): undefined reference to `dtrsm_'
rsdpa_dpotrf.cpp:(.text+0x4a9): undefined reference to `dsyrk_'
collect2: ld returned 1 exit status

mex: link of ' "mexsdpa.mexglx"' failed.

make: *** [mexsdpa] Error 1

Thanks for the help.