Problem with running matlab_uvm_example

I’m trying to use the matlab_uvm_example example from Verification Academy specifically trying to run make simulate_matlab_sb. Everything compiles but I’m running into this problem while trying to load matlab_dpi.so in Questasim. I do have matlab installed and can run it simply by typing matlab. Using 10.2a and Matlab R2012b. I have export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/MATLAB/R2012b/bin/glnxa64 for the LD_LIBRARY_PATH setup.

Loading ./matlab_dpi.so

** Error: (vsim-3197) Load of “./matlab_dpi.so” failed: ./matlab_dpi.so: undefined symbol: engEvalString.

** Fatal: (vsim-3748) Failed to load DPI object file “./matlab_dpi.so” while trying to resolve ‘start_matlab’.

FATAL ERROR while loading design

Error loading design

These examples were tested against MATLAB 2011. The symbol ‘engEvalString’ is from the MATLAB libraries, so it is possible that they have made some changes that haven’t been tested recently.

Take a look at the details of the compilation phase and see if there are any warnings about undefined symbols or something similar. Also, you can run ‘ldd’ on matlab_dpi.so and ensure that all the shared libraries are resolved properly.

In reply to cgales:

I was able to successfully run engdemo MATLAB demo code in shell and that code also contains engEvalString. I ran ldd on matlab_dpi.so and it looks ok. The compile has no warnings or errors. It looks like it has something to with LD_LIBRARY_PATH but don’t know why. I also wrote the path into etc/ conf file and did a ldconfig but this also didn’t resolve the issue.

Down grade to gcc-4.4 from gcc-4.6.3 worked