Differences

This shows you the differences between two versions of the page.

installation:troubleshooting [2010/01/04 15:18]
Michael Repucci
installation:troubleshooting [2010/01/18 17:37] (current)
Michael Repucci
Line 21: Line 21:
</code> </code>
Susan contacted me by email for help. Notice in the error above, the file 'user32.lib' is either missing or corrupt. Since this file is not needed by the toolkit, per say, but by the operating system, it was an indication that the compiler was not properly installed. Susan was running on the following system: //Windows XP Professional 2002, service pack 3//, //Matlab 7.8.0.347 (R2009a)//, //Microsoft Visual C++ 2003//. The fact that her versions of Matlab and Microsoft Visual C++ were separated by six years was further indication that the problem was related to the compiler. And, in fact, when Susan installed the newer //Microsoft Visual C++ 2008// (Express Edition), the issue was resolved. --- //[[mar2022@med.cornell.edu|Michael Repucci]] 2009/06/29 17:04// Susan contacted me by email for help. Notice in the error above, the file 'user32.lib' is either missing or corrupt. Since this file is not needed by the toolkit, per say, but by the operating system, it was an indication that the compiler was not properly installed. Susan was running on the following system: //Windows XP Professional 2002, service pack 3//, //Matlab 7.8.0.347 (R2009a)//, //Microsoft Visual C++ 2003//. The fact that her versions of Matlab and Microsoft Visual C++ were separated by six years was further indication that the problem was related to the compiler. And, in fact, when Susan installed the newer //Microsoft Visual C++ 2008// (Express Edition), the issue was resolved. --- //[[mar2022@med.cornell.edu|Michael Repucci]] 2009/06/29 17:04//
 +
 +==== libstdc++ and libgcc_s ====
 +Matlab includes the library files libstdc++ and libgcc_s, which are necessary for compiling and running MEX files built from C++ code with gcc. However, if you use a non-supported version of gcc, as I do---gcc 4.3.3 with Matlab R2008b---then the compilation instructions in make.m will (apparently by default) use the shared libraries on your system, but the execution of the resultant MEX files will try to use the included library files found in $MATLABPATH/sys/os/$ARCH/. I overcame this issue by symlinking to the updated files on my system:
 +<code>
 +ln -s /lib/libgcc_s.so.1 /usr/local/matlabR2008b/sys/os/glnx86/libgcc_s.so.1
 +ln -s /usr/lib/libstdc++.so.6.0.10 /usr/local/matlabR2008b/sys/os/glnx86/libstdc++.so.6
 +</code>
 +Be sure to use the appropriate paths for your system. You may also need to run the command with sudo.
 +
 +Other Matlab users have experienced a similar issue, and suggested an [[http://www.mathworks.de/matlabcentral/newsreader/view_thread/162466|alternative approach]], which involves a simple change to the LD_LIBRARY_PATH in your Matlab startup options. Unfortunately, this did not work for me. --- //[[mar2022@med.cornell.edu|Michael Repucci]] 2009/07/22 17:28//
==== 64-bit Struggles ==== ==== 64-bit Struggles ====
installation/troubleshooting.txt · Last modified: 2010/01/18 17:37 by Michael Repucci