[ADOL-C] matlab mex linking error

Sang Ok Song sangok.song at gmail.com
Thu Feb 24 11:10:55 EST 2011


Hi,

When I try to compile the matlab interface, I get the following error:

-> gcc-4.0 -O -Wl,-twolevel_namespace -undefined error -arch x86_64 - 
Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version- 
min=10.5 -bundle -Wl,-exported_symbols_list,/Applications/ 
MATLAB_R2009b.app/extern/lib/maci64/mexFunction.map -o   
"simulate_cvmodel_sens.mexmaci64"  simulate_cvmodel_sens.o getPars.o  
runmodel_sens.o cvmodel_sens.o cvmodel.o  -L/opt/sundials-2.3.0/lib -L/ 
opt/adolc/lib64 -lsundials_cvodes -lsundials_nvecserial -ladolc -L/ 
Applications/MATLAB_R2009b.app/bin/maci64 -lmx -lmex -lmat -lstdc++

Undefined symbols:
   "adtl::ADOLC_numDir", referenced from:
       adtl::setNumDir(unsigned int)in cvmodel_sens.o
       adtl::setNumDir(unsigned int)in cvmodel_sens.o
       cvmodel_sens(int, double, _generic_N_Vector*,  
_generic_N_Vector*, _generic_N_Vector**, _generic_N_Vector**, void*,  
_generic_N_Vector*, _generic_N_Vector*)in cvmodel_sens.o
       cvmodel_sens(int, double, _generic_N_Vector*,  
_generic_N_Vector*, _generic_N_Vector**, _generic_N_Vector**, void*,  
_generic_N_Vector*, _generic_N_Vector*)in cvmodel_sens.o
       cvmodel_sens(int, double, _generic_N_Vector*,  
_generic_N_Vector*, _generic_N_Vector**, _generic_N_Vector**, void*,  
_generic_N_Vector*, _generic_N_Vector*)in cvmodel_sens.o
       cvmodel_jac(long, _DenseMat*, double, _generic_N_Vector*,  
_generic_N_Vector*, void*, _generic_N_Vector*, _generic_N_Vector*,  
_generic_N_Vector*)in cvmodel_sens.o
       cvmodel_jac(long, _DenseMat*, double, _generic_N_Vector*,  
_generic_N_Vector*, void*, _generic_N_Vector*, _generic_N_Vector*,  
_generic_N_Vector*)in cvmodel_sens.o
       cvmodel_jac(long, _DenseMat*, double, _generic_N_Vector*,  
_generic_N_Vector*, void*, _generic_N_Vector*, _generic_N_Vector*,  
_generic_N_Vector*)in cvmodel_sens.o
       vlved(adtl::adouble, adtl::adouble, adtl::adouble,  
adtl::adouble, adtl::adouble, adtl::adouble, adtl::adouble)in  
cvmodel_sens.o
       vlved(adtl::adouble, adtl::adouble, adtl::adouble,  
adtl::adouble, adtl::adouble, adtl::adouble, adtl::adouble)in  
cvmodel_sens.o
       vlved(adtl::adouble, adtl::adouble, adtl::adouble,  
adtl::adouble, adtl::adouble, adtl::adouble, adtl::adouble)in  
cvmodel_sens.o
       vlved(adtl::adouble, adtl::adouble, adtl::adouble,  
adtl::adouble, adtl::adouble, adtl::adouble, adtl::adouble)in  
cvmodel_sens.o
       vlved(adtl::adouble, adtl::adouble, adtl::adouble,  
adtl::adouble, adtl::adouble, adtl::adouble, adtl::adouble)in  
cvmodel_sens.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

     mex: link of ' "simulate_cvmodel_sens.mexmaci64"' failed.

It seems to me that it may be a problem of liking to libadolc, but I  
have no idea why.
If you need more specific information about this mexing, let me know.
Your help would be really appreciated.

- Sang



More information about the ADOL-C mailing list