From: Michele Catalano on
I'm trying to mex yprimef.F file with the intel compiler, I set the mexopts.sh file as follows:

FC='/opt/intel/Compiler/11.0/081/bin/ia32/ifort'
FFLAGS='-fpp -fPIC -u -w95 -warn all'
FLIBS="$RPATH $MLIBS -lm -L/opt/intel/Compiler/11.0/081/lib/ia32/"
FOPTIMFLAGS='-O3'
FDEBUGFLAGS='-g'

the command is mex -v yprimef.F yprimefg.F and the output i get is:

mexopts.sh sourced from directory (DIR = $HOME/.matlab/$REL_VERSION)
FILE = /home/catalanom/.matlab/R2006a/mexopts.sh
----------------------------------------------------------------
-> MATLAB = /usr/local/matlab7
-> CC = gcc
-> CC flags:
CFLAGS = -fPIC -ansi -D_GNU_SOURCE -pthread -fexceptions -m32
CDEBUGFLAGS = -g
COPTIMFLAGS = -O -DNDEBUG
CLIBS = -Wl,-rpath-link,/usr/local/matlab7/bin/glnx86 -L/usr/local/matlab7/bin/glnx86 -lmx -lmex -lmat -lm -lstdc++
arguments =
-> CXX = g++
-> CXX flags:
CXXFLAGS = -fPIC -ansi -D_GNU_SOURCE -pthread
CXXDEBUGFLAGS = -g
CXXOPTIMFLAGS = -O -DNDEBUG
CXXLIBS = -Wl,-rpath-link,/usr/local/matlab7/bin/glnx86 -L/usr/local/matlab7/bin/glnx86 -lmx -lmex -lmat -lm
arguments =
-> FC = /opt/intel/Compiler/11.0/081/bin/ia32/ifort
-> FC flags:
FFLAGS = -fpp -fPIC -u -w95 -warn all
FDEBUGFLAGS = -g
FOPTIMFLAGS = -O3
FLIBS = -Wl,-rpath-link,/usr/local/matlab7/bin/glnx86 -L/usr/local/matlab7/bin/glnx86 -lmx -lmex -lmat -lm -L/opt/intel/Compiler/11.0/081/lib/ia32/
arguments =
-> LD = /opt/intel/Compiler/11.0/081/bin/ia32/ifort
-> Link flags:
LDFLAGS = -pthread -shared -m32 -Wl,--version-script,/usr/local/matlab7/extern/lib/glnx86/fexport.map
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -O
LDEXTENSION = .mexglx
arguments =
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments =
----------------------------------------------------------------

-> /opt/intel/Compiler/11.0/081/bin/ia32/ifort -c -I/usr/local/matlab7/extern/include -I/usr/local/matlab7/simulink/include -fpp -fPIC -u -w95 -warn all -O3 yprimef.F

-> /opt/intel/Compiler/11.0/081/bin/ia32/ifort -c -I/usr/local/matlab7/extern/include -I/usr/local/matlab7/simulink/include -fpp -fPIC -u -w95 -warn all -O3 yprimefg.F

-> /opt/intel/Compiler/11.0/081/bin/ia32/ifort -O -pthread -shared -m32 -Wl,--version-script,/usr/local/matlab7/extern/lib/glnx86/fexport.map -o yprimef.mexglx yprimef.o yprimefg.o /usr/local/matlab7/extern/lib/glnx86/version4.o -Wl,-rpath-link,/usr/local/matlab7/bin/glnx86 -L/usr/local/matlab7/bin/glnx86 -lmx -lmex -lmat -lm -L/opt/intel/Compiler/11.0/081/lib/ia32/

when I run yprimef i get:

>> yprimef(1,1:11)
??? Invalid MEX-file '/home/catalanom/Scrivania/provaF/yprimef.mexglx': libifport.so.5: impossibile aprire il file oggetto condiviso: Nessun file o directory.

I think is a problem of shared libraries, anyone can help me?

thanks a lot