MATLAB: Which Sun Performance libraries must I use with the application which calls a library generated with MATLAB Compiler 4.4 (R2006a)

MATLAB Compiler

I have created a shared library with MATLAB Compiler 4.4 (R2006a) and am calling this from a program which uses OpenMP and other Sun Performance Library calls on Solaris. I link it against /opt/SUNWspro/v8plusb/libsunperf.so when using MBUILD:
mbuild mydriver.c -L. -lmylib -I. -L/opt/SUNWspro/v8plusb -xlic_lib=sunperf
However, at runtime I receive the error:
Fatal error loading library
/usr/local/common/matlab_2006a/bin/sol2/libmwmclmcr.so Error: ld.so.1:
mydriver: fatal: relocation error: file
/opt/SUNWspro/lib/libsunperf.so.4: symbol
__mt_MasterFunction_: referenced symbol not found

Best Answer

This behavior is the result of an incompatibility between MATLAB libraries and libsunperf.so, the "Shared" version of the Sun Performance Library.
Some customers have had success with linking against libsunperf_mt.so, the "Dedicated" MTSK-based version of the Sun Performance Library, and the MTSK task library:
mbuild mydriver.c -L. -lmylib -I. -L/opt/SUNWspro/v8plusb -xlic_lib=sunperf_mt -lmtsk
Because the Sun Performance Library is licensed at runtime, you may need to use "-xlic_lib=" instead of "-l"; for more information, consult your Sun Performance Library documentation.