sam81
April 4th, 2007, 08:26 PM
Hello, has anyone had any luck compiling mex files in feisty?
I'm using Matlab 7.1.0.21 (R14) Service Pack 3 (student version), and I'm trying to compile a mex file for sound playback. I have a mexopts.sh file in the directory where I'm compiling, and have set the compiler version to gcc-4.1 there
CC = gcc-4.1
The compilation goes fine with
mex -v playsnd.c
however when I try to use the binary I get the following error:
EDU>> a=wavread('interval1.wav');
EDU>> playsnd(a, 44100, 16)
??? Invalid MEX-file '/home/sam/playsnd/playsnd.mexglx': /usr/local/matlab71_sv/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6).
gcc 4.2 is not in the repos as far as I know, but for some reason one of its library files is required :confused: . A google search came up with the following thread, http://ubuntuforums.org/showthread.php?t=270605 which suggests that the problem is not matlab specific. The solutions proposed in that thread didn't work for me, and I'm a bit confused :( by all the linking and C library version stuff (you guess I have no experience in C programming).
If anyone has any suggestions it would be very much appreciated!
btw. the file compiles and works well in edgy with the same matlab version.
I'm using Matlab 7.1.0.21 (R14) Service Pack 3 (student version), and I'm trying to compile a mex file for sound playback. I have a mexopts.sh file in the directory where I'm compiling, and have set the compiler version to gcc-4.1 there
CC = gcc-4.1
The compilation goes fine with
mex -v playsnd.c
however when I try to use the binary I get the following error:
EDU>> a=wavread('interval1.wav');
EDU>> playsnd(a, 44100, 16)
??? Invalid MEX-file '/home/sam/playsnd/playsnd.mexglx': /usr/local/matlab71_sv/bin/glnx86/../../sys/os/glnx86/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /usr/lib/libstdc++.so.6).
gcc 4.2 is not in the repos as far as I know, but for some reason one of its library files is required :confused: . A google search came up with the following thread, http://ubuntuforums.org/showthread.php?t=270605 which suggests that the problem is not matlab specific. The solutions proposed in that thread didn't work for me, and I'm a bit confused :( by all the linking and C library version stuff (you guess I have no experience in C programming).
If anyone has any suggestions it would be very much appreciated!
btw. the file compiles and works well in edgy with the same matlab version.