MATLAB: Symbol lookup error: undefined symbol , upon calling C executable from matlab using system command

symbol lookup error: undefined symbol

Upon giving the following command from Matlab command prompt, I get this error:
>>[status, result] = system('./testGEA outDataTest1.txt')
status =
127
result =
./testGEA: symbol lookup error: /home/swagatika/softwares/qvision.0.8.0/lib/libqvision.so.0: undefined symbol: _ZN12QApplication10commitDataER15QSessionManager
testGEA is an executable file compiled using Qvision library (link : http://qvision.sourceforge.net/testGEA_8cpp.html)
I can successfully execute the command from Linux(ubuntu 10.10) terminal, but calling from Matlab fails.
Please help.
Thanks.

Best Answer

Possibly a badly linked library http://nrcw.com/?p=546
The symbol might be defined in a library that does not happen to be on the LD_LIBRARY_PATH that is used by MATLAB.
The script that starts MATLAB often sets up LD_LIBRARY_PATH
You could probably use "ldd" to track down which library is supplying the symbol when you execute from the terminal.
Related Question