Print

Print


Dear Ivan,

this is because you commented out ALL libraries... Excluding libstdc++  
would not work anyway, you have to find out where it can be found on  
your system. If it has the wrong version, then you need to install the  
version required by matlab in a location where it does not interfere  
with your system library.

Volkmar

Quoting Ivan Vanney <[log in to unmask]>:

> Hello, I tried as you said, putting # in the mexopts.sh, the lines with
> libstdc++, now i get the next error, I also pasted how I edited the
> mexopts.sh, thank you for your help.
>
>
> [root@localhost src]# make
> _____________________________________________________________
>
>         Linux compilation (x86-64) - using gcc
> _____________________________________________________________
>
> mex COPTIMFLAGS='-O3 -funroll-loops -fPIC -march=x86-64 -mfpmath=sse'
> spm_sample_vol.c spm_vol_utils.mexa64.a
> spm_sample_vol.o: In function `mexFunction':
> spm_sample_vol.c:(.text+0x2c): undefined reference to `mexErrMsgTxt'
> spm_sample_vol.c:(.text+0x59): undefined reference to `mexErrMsgTxt'
> spm_sample_vol.c:(.text+0x68): undefined reference to `mxIsNumeric'
> spm_sample_vol.c:(.text+0x76): undefined reference to `mxIsComplex'
> spm_sample_vol.c:(.text+0x98): undefined reference to `mexErrMsgTxt'
> spm_sample_vol.c:(.text+0xa7): undefined reference to `mxIsNumeric'
> spm_sample_vol.c:(.text+0xb5): undefined reference to `mxIsComplex'
> spm_sample_vol.c:(.text+0xd7): undefined reference to `mexErrMsgTxt'
> spm_sample_vol.c:(.text+0xea): undefined reference to `mxIsNumeric'
> spm_sample_vol.c:(.text+0xf8): undefined reference to `mxIsComplex'
> spm_sample_vol.c:(.text+0x11c): undefined reference to `mexErrMsgTxt'
> spm_sample_vol.c:(.text+0x124): undefined reference to `mxGetM'
> spm_sample_vol.c:(.text+0x12f): undefined reference to `mxGetN'
> spm_sample_vol.c:(.text+0x13a): undefined reference to `mxGetM'
> spm_sample_vol.c:(.text+0x156): undefined reference to `mexErrMsgTxt'
> spm_sample_vol.c:(.text+0x165): undefined reference to `mxIsNumeric'
> spm_sample_vol.c:(.text+0x173): undefined reference to `mxIsComplex'
> spm_sample_vol.c:(.text+0x195): undefined reference to `mexErrMsgTxt'
> spm_sample_vol.c:(.text+0x19e): undefined reference to `mxGetPr'
> spm_sample_vol.c:(.text+0x1c8): undefined reference to `mxGetM'
> spm_sample_vol.c:(.text+0x1d4): undefined reference to `mxGetN'
> spm_sample_vol.c:(.text+0x1eb): undefined reference to `mxGetPr'
> spm_sample_vol.c:(.text+0x213): undefined reference to
> `mxCreateDoubleMatrix_700'
> spm_sample_vol.c:(.text+0x228): undefined reference to
> `mxCreateDoubleMatrix_700'
> spm_sample_vol.c:(.text+0x23e): undefined reference to
> `mxCreateDoubleMatrix_700'
> spm_sample_vol.c:(.text+0x253): undefined reference to
> `mxCreateDoubleMatrix_700'
> spm_sample_vol.c:(.text+0x267): undefined reference to `mxGetPr'
> spm_sample_vol.c:(.text+0x273): undefined reference to `mxGetPr'
> spm_sample_vol.c:(.text+0x27e): undefined reference to `mxGetPr'
> spm_sample_vol.c:(.text+0x28e): undefined reference to `mxGetPr'
> spm_sample_vol.c:(.text+0x29e): undefined reference to `mxGetPr'
> spm_sample_vol.o:spm_sample_vol.c:(.text+0x2ae): more undefined references
> to `mxGetPr' follow
> spm_sample_vol.o: In function `mexFunction':
> spm_sample_vol.c:(.text+0x339): undefined reference to
> `mxCreateDoubleMatrix_700'
> spm_sample_vol.c:(.text+0x34c): undefined reference to `mxGetPr'
> spm_sample_vol.c:(.text+0x357): undefined reference to `mxGetPr'
> spm_sample_vol.c:(.text+0x362): undefined reference to `mxGetPr'
> spm_sample_vol.c:(.text+0x371): undefined reference to `mxGetPr'
> spm_sample_vol.c:(.text+0x3c6): undefined reference to `mexErrMsgTxt'
> spm_sample_vol.c:(.text+0x3d4): undefined reference to `mxGetN'
> spm_sample_vol.c:(.text+0x3ee): undefined reference to `mxGetM'
> spm_sample_vol.c:(.text+0x403): undefined reference to `mxGetN'
> spm_sample_vol.c:(.text+0x44d): undefined reference to `mexErrMsgTxt'
> spm_sample_vol.c:(.text+0x45c): undefined reference to `mxIsSparse'
> spm_sample_vol.c:(.text+0x46e): undefined reference to `mxIsDouble'
> spm_sample_vol.c:(.text+0x480): undefined reference to `mxGetM'
> spm_sample_vol.c:(.text+0x48d): undefined reference to `mxGetN'
> spm_sample_vol.c:(.text+0x4a5): undefined reference to `mxGetM'
> spm_sample_vol.c:(.text+0x4b2): undefined reference to `mxGetN'
> spm_sample_vol.c:(.text+0x4d6): undefined reference to `mxIsSparse'
> spm_sample_vol.c:(.text+0x4ec): undefined reference to `mxIsDouble'
> spm_sample_vol.c:(.text+0x506): undefined reference to `mxIsSparse'
> spm_sample_vol.c:(.text+0x51c): undefined reference to `mxIsDouble'
> spm_sample_vol.c:(.text+0x536): undefined reference to `mxIsSparse'
> spm_sample_vol.c:(.text+0x54c): undefined reference to `mxIsDouble'
> spm_vol_utils.mexa64.a(spm_mapping.mexa64.o): In function `get_dtype':
> spm_mapping.c:(.text+0xb): undefined reference to `mxIsStruct'
> spm_mapping.c:(.text+0x1b): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x33): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x43): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x4e): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x64): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x6c): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x8d): undefined reference to `mexErrMsgTxt'
> spm_vol_utils.mexa64.a(spm_mapping.mexa64.o): In function `voxdim':
> spm_mapping.c:(.text+0xf9): undefined reference to `sqrt'
> spm_mapping.c:(.text+0x14d): undefined reference to `sqrt'
> spm_mapping.c:(.text+0x19c): undefined reference to `sqrt'
> spm_vol_utils.mexa64.a(spm_mapping.mexa64.o): In function `free_maps':
> spm_mapping.c:(.text+0x219): undefined reference to `mxFree'
> spm_mapping.c:(.text+0x22f): undefined reference to `mxFree'
> spm_mapping.c:(.text+0x245): undefined reference to `mxFree'
> spm_mapping.c:(.text+0x2a5): undefined reference to `mxFree'
> spm_mapping.c:(.text+0x2bd): undefined reference to `mxFree'
> spm_vol_utils.mexa64.a(spm_mapping.mexa64.o):spm_mapping.c:(.text+0x2d5):
> more undefined references to `mxFree' follow
> spm_vol_utils.mexa64.a(spm_mapping.mexa64.o): In function `get_map_dat':
> spm_mapping.c:(.text+0x43a): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x454): undefined reference to `mxIsDouble'
> spm_mapping.c:(.text+0x464): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x46f): undefined reference to
> `mxGetNumberOfDimensions_700'
> spm_mapping.c:(.text+0x483): undefined reference to `mxGetDimensions_700'
> spm_mapping.c:(.text+0x6fa): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x70a): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x715): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x737): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x73f): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x775): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x788): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x79c): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x7a7): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x7b9): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x7c4): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x7e6): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x7ee): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x81c): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x844): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x856): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x868): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x8a8): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x8bc): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x8ce): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x8f3): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x8fb): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x90d): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x918): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0xaa9): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0xabd): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0xae2): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0xaea): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0xbc6): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0xbda): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0xf7a): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0xf82): undefined reference to `mxGetDimensions_700'
> spm_mapping.c:(.text+0xf95): undefined reference to `mxIsSingle'
> spm_mapping.c:(.text+0xfa8): undefined reference to `mxIsInt32'
> spm_mapping.c:(.text+0xfbb): undefined reference to `mxIsUint32'
> spm_mapping.c:(.text+0xfce): undefined reference to `mxIsInt16'
> spm_mapping.c:(.text+0xfe1): undefined reference to `mxIsUint16'
> spm_mapping.c:(.text+0xff4): undefined reference to `mxIsInt8'
> spm_mapping.c:(.text+0x1007): undefined reference to `mxIsUint8'
> spm_mapping.c:(.text+0x102a): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x1037): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x11dc): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x1208): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x1225): undefined reference to `mexErrMsgTxt'
> spm_vol_utils.mexa64.a(spm_mapping.mexa64.o): In function `get_maps':
> spm_mapping.c:(.text+0x124f): undefined reference to `mxIsStruct'
> spm_mapping.c:(.text+0x1263): undefined reference to `mxIsStruct'
> spm_mapping.c:(.text+0x1277): undefined reference to
> `mxGetNumberOfDimensions_700'
> spm_mapping.c:(.text+0x1285): undefined reference to `mxGetDimensions_700'
> spm_mapping.c:(.text+0x13a9): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x13cf): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x140c): undefined reference to
> `mxGetNumberOfDimensions_700'
> spm_mapping.c:(.text+0x141d): undefined reference to `mxIsNumeric'
> spm_mapping.c:(.text+0x142d): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x145d): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x1476): undefined reference to `mxIsComplex'
> spm_mapping.c:(.text+0x1486): undefined reference to `mxIsSparse'
> spm_mapping.c:(.text+0x149c): undefined reference to `mxIsDouble'
> spm_mapping.c:(.text+0x14b3): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x14c6): undefined reference to
> `mxGetNumberOfDimensions_700'
> spm_mapping.c:(.text+0x14dd): undefined reference to `mxGetDimensions_700'
> spm_mapping.c:(.text+0x1810): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x1829): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x1842): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x187a): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x1be8): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x1bfc): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x1c07): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x1c2f): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x1c37): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x1ca2): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x1cb6): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x1cca): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x1ce8): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x1cfc): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x1d07): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x1d2f): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x1d37): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x1d8e): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x1da2): undefined reference to `mxIsChar'
> spm_mapping.c:(.text+0x1dc3): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x1dd7): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x1dff): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x1e07): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x1e12): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x1edf): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x206d): undefined reference to `mxGetField_700'
> spm_mapping.c:(.text+0x2081): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x20a9): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x20b1): undefined reference to `mxGetPr'
> spm_mapping.c:(.text+0x2319): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x2324): undefined reference to `mxGetM'
> spm_mapping.c:(.text+0x2338): undefined reference to `mxCalloc'
> spm_mapping.c:(.text+0x2348): undefined reference to `mxGetString_700'
> spm_mapping.c:(.text+0x23cf): undefined reference to `mxFree'
> spm_mapping.c:(.text+0x2408): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x24de): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x24f0): undefined reference to `mxGetN'
> spm_mapping.c:(.text+0x255c): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x257f): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x25a2): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x25c5): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x25d2): undefined reference to `mxFree'
> spm_mapping.c:(.text+0x25f0): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x264f): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x265c): undefined reference to `mxFree'
> spm_mapping.c:(.text+0x267a): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x268e): undefined reference to `mxFree'
> spm_mapping.c:(.text+0x26ac): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x270e): undefined reference to `mxFree'
> spm_mapping.c:(.text+0x272c): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x27de): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x27ea): undefined reference to `mxGetDimensions_700'
> spm_mapping.c:(.text+0x2801): undefined reference to `mxIsSingle'
> spm_mapping.c:(.text+0x2818): undefined reference to `mxIsInt32'
> spm_mapping.c:(.text+0x282f): undefined reference to `mxIsUint32'
> spm_mapping.c:(.text+0x2846): undefined reference to `mxIsInt16'
> spm_mapping.c:(.text+0x285d): undefined reference to `mxIsUint16'
> spm_mapping.c:(.text+0x2874): undefined reference to `mxIsInt8'
> spm_mapping.c:(.text+0x288b): undefined reference to `mxIsUint8'
> spm_mapping.c:(.text+0x28a2): undefined reference to `mexErrMsgTxt'
> spm_mapping.c:(.text+0x2918): undefined reference to `mexErrMsgTxt'
> spm_vol_utils.mexa64.a(spm_mapping.mexa64.o): In function `free_maps':
> spm_mapping.c:(.text+0x376): undefined reference to `mxFree'
> spm_vol_utils.mexa64.a(utils_uchar.mexa64.o): In function `slice_uchar_1':
> spm_vol_utils.c:(.text+0x1919): undefined reference to `floor'
> spm_vol_utils.c:(.text+0x1962): undefined reference to `floor'
> spm_vol_utils.c:(.text+0x19a7): undefined reference to `floor'
> spm_vol_utils.mexa64.a(utils_uchar.mexa64.o): In function `slice_uchar_0':
> spm_vol_utils.c:(.text+0x1deb): undefined reference to `floor'
> spm_vol_utils.c:(.text+0x1e23): undefined reference to `floor'
> spm_vol_utils.mexa64.a(utils_uchar.mexa64.o):spm_vol_utils.c:(.text+0x1f3a):
> more undefined references to `floor' follow
> spm_vol_utils.mexa64.a(spm_make_lookup.mexa64.o): In function
> `make_lookup_sinc_grad':
> spm_make_lookup.c:(.text+0x1ca4): undefined reference to `sin'
> spm_make_lookup.c:(.text+0x1cd1): undefined reference to `cos'
> spm_make_lookup.c:(.text+0x1d44): undefined reference to `sin'
> spm_make_lookup.c:(.text+0x1d72): undefined reference to `cos'
> spm_vol_utils.mexa64.a(spm_make_lookup.mexa64.o): In function
> `make_lookup_sinc':
> spm_make_lookup.c:(.text+0x2006): undefined reference to `floor'
> spm_make_lookup.c:(.text+0x204b): undefined reference to `floor'
> spm_make_lookup.c:(.text+0x20d6): undefined reference to `floor'
> spm_make_lookup.c:(.text+0x2157): undefined reference to `sin'
> spm_make_lookup.c:(.text+0x218d): undefined reference to `cos'
> spm_make_lookup.c:(.text+0x21f3): undefined reference to `sin'
> spm_make_lookup.c:(.text+0x2230): undefined reference to `cos'
> spm_make_lookup.c:(.text+0x228a): undefined reference to `sin'
> spm_make_lookup.c:(.text+0x22c0): undefined reference to `cos'
> spm_make_lookup.c:(.text+0x2309): undefined reference to `sin'
> spm_make_lookup.c:(.text+0x2346): undefined reference to `cos'
> collect2: ld returned 1 exit status
>
>     mex: link of 'spm_sample_vol.mexa64' failed.
>
> make: *** [spm_sample_vol.mexa64] Error 1
>
>
>
>
> and tthis is how I edited the mexopts.sh:
>
>
>
>
> ----------------------------------------------------------------------------
> #
>     TMW_ROOT="$MATLAB"
>     MFLAGS=''
>     if [ "$ENTRYPOINT" = "mexLibrary" ]; then
>         MLIBS="-L$TMW_ROOT/bin/$Arch -lmx -lmex -lmat -lmwservices -lut"
>     else
>         MLIBS="-L$TMW_ROOT/bin/$Arch -lmx -lmex -lmat"
>     fi
>     case "$Arch" in
>         Undetermined)
> #----------------------------------------------------------------------------
> # Change this line if you need to specify the location of the MATLAB
> # root directory.  The script needs to know where to find utility
> # routines so that it can determine the architecture; therefore, this
> # assignment needs to be done while the architecture is still
> # undetermined.
> #----------------------------------------------------------------------------
>             MATLAB="$MATLAB"
>             ;;
>         glnx86)
> #----------------------------------------------------------------------------
>             RPATH="-Wl,-rpath-link,$TMW_ROOT/bin/$Arch"
>             CC='gcc'
>             CFLAGS='-ansi -D_GNU_SOURCE -fexceptions'
>             CFLAGS="$CFLAGS -fPIC -pthread -m32"
>             CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
>           #  CLIBS="$RPATH $MLIBS -lm -lstdc++"
>             COPTIMFLAGS='-O -DNDEBUG'
>             CDEBUGFLAGS='-g'
> #
>             CXX='g++'
>             CXXFLAGS='-ansi -D_GNU_SOURCE'
>             CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64"
>             CXXFLAGS="$CXXFLAGS -fPIC -pthread"
>             CXXLIBS="$RPATH $MLIBS -lm"
>             CXXOPTIMFLAGS='-O -DNDEBUG'
>             CXXDEBUGFLAGS='-g'
> #
> #
>             FC='g95'
>             FFLAGS='-fexceptions'
>             FFLAGS="$FFLAGS -fPIC"
>             FLIBS="$RPATH $MLIBS -lm"
>             FOPTIMFLAGS='-O'
>             FDEBUGFLAGS='-g'
> #
>             LD="$COMPILER"
> LDEXTENSION='.mexglx'
>             LDFLAGS="-pthread -shared -m32
> -Wl,--version-script,$TMW_ROOT/extern/lib/$Arch/$MAPFILE -Wl,--no-undefined"
>             LDOPTIMFLAGS='-O'
>             LDDEBUGFLAGS='-g'
> #
>             POSTLINK_CMDS=':'
> #----------------------------------------------------------------------------
>             ;;
>         glnxa64)
> #----------------------------------------------------------------------------
>             RPATH="-Wl,-rpath-link,$TMW_ROOT/bin/$Arch"
>             CC='gcc'
>             CFLAGS='-ansi -D_GNU_SOURCE -fexceptions'
>             CFLAGS="$CFLAGS -fPIC -fno-omit-frame-pointer -pthread"
>           #  CLIBS="$RPATH $MLIBS -lm -lstdc++"
>             COPTIMFLAGS='-O -DNDEBUG'
>             CDEBUGFLAGS='-g'
> #
>             CXX='g++'
>             CXXFLAGS='-ansi -D_GNU_SOURCE'
>             CXXFLAGS="$CXXFLAGS -fPIC -fno-omit-frame-pointer -pthread"
>             CXXLIBS="$RPATH $MLIBS -lm"
>             CXXOPTIMFLAGS='-O -DNDEBUG'
>             CXXDEBUGFLAGS='-g'
> #
> #
>             FC='g95'
>             FFLAGS='-fexceptions'
>             FFLAGS="$FFLAGS -fPIC -fno-omit-frame-pointer"
>             FLIBS="$RPATH $MLIBS -lm"
>             FOPTIMFLAGS='-O'
>             FDEBUGFLAGS='-g'
> #
>             LD="$COMPILER"
>             LDEXTENSION='.mexa64'
>             LDFLAGS="-pthread -shared
> -Wl,--version-script,$TMW_ROOT/extern/lib/$Arch/$MAPFILE -Wl,--no-undefined"
>             LDOPTIMFLAGS='-O'
>             LDDEBUGFLAGS='-g'
> #
>             POSTLINK_CMDS=':'
> #----------------------------------------------------------------------------
>             ;;
>         sol64)
> #----------------------------------------------------------------------------
>             CC='cc -xarch=v9a'
>             CFLAGS='-dalign -xlibmieee -D__EXTENSIONS__
> -D_POSIX_C_SOURCE=199506L -mt'
>             CFLAGS="$CFLAGS -KPIC"
> CLIBS="$MLIBS -lm"
>             CLIBS="$CLIBS -lc"
>             COPTIMFLAGS='-xO3 -xlibmil -DNDEBUG'
>             CDEBUGFLAGS='-xs -g'
> #
>             CXX='CC -xarch=v9a -compat=5'
>             CCV=`CC -xarch=v9a -V 2>&1`
>             version=`expr "$CCV" : '.*\([0-9][0-9]*\)\.'`
>             if [ "$version" = "4" ]; then
>                     echo "SC5.0 or later C++ compiler is required"
>             fi
>             CXXFLAGS='-dalign -xlibmieee -D__EXTENSIONS__
> -library=stlport4,Crun'
>             CXXFLAGS="$CXXFLAGS -D_POSIX_C_SOURCE=199506L -mt"
>             CXXFLAGS="$CXXFLAGS -KPIC -norunpath"
>             CXXLIBS="$MLIBS -lm"
>             CXXOPTIMFLAGS='-xO3 -xlibmil -DNDEBUG'
>             CXXDEBUGFLAGS='-xs -g'
> #
>             FC='f90 -xarch=v9a'
>             FFLAGS='-dalign'
>             FFLAGS="$FFLAGS -KPIC -mt"
>             FLIBS="$MLIBS -lfui -lfsu -lsunmath -lm -lc"
>             FOPTIMFLAGS='-O'
>             FDEBUGFLAGS='-xs -g'
> #
>             LD="$COMPILER"
>             LDEXTENSION='.mexs64'
>             LDFLAGS="-G -mt -M$TMW_ROOT/extern/lib/$Arch/$MAPFILE"
>             LDOPTIMFLAGS='-O'
>             LDDEBUGFLAGS='-xs -g'
> #
>             POSTLINK_CMDS=':'
> #----------------------------------------------------------------------------
>             ;;
>         mac)
> #----------------------------------------------------------------------------
>             CC='gcc-4.0'
>             CFLAGS='-fno-common -no-cpp-precomp -fexceptions'
>           #  CLIBS="$MLIBS -lstdc++"
>             COPTIMFLAGS='-O3 -fno-loop-optimize -DNDEBUG'
>             CDEBUGFLAGS='-g'
> #
>             CXX=g++-4.0
>             CXXFLAGS='-fno-common -no-cpp-precomp -fexceptions -arch ppc'
>           #  CXXLIBS="$MLIBS -lstdc++"
>             CXXOPTIMFLAGS='-O3 -fno-loop-optimize -DNDEBUG'
>             CXXDEBUGFLAGS='-g'
>
>
> C='g95'
>             FFLAGS='-fexceptions'
>             FC_LIBDIR=`$FC -print-file-name=libf95.a 2>&1 | sed -n
> '1s/\/*libf95\.a//p'`
>             FLIBS="$MLIBS -L$FC_LIBDIR -lf95"
>             FOPTIMFLAGS='-O'
>             FDEBUGFLAGS='-g'
> #
>             LD="$CC"
>             LDEXTENSION='.mexmac'
>             LDFLAGS='-Wl,-flat_namespace -undefined suppress'
>             LDFLAGS="$LDFLAGS -bundle
> -Wl,-exported_symbols_list,$TMW_ROOT/extern/lib/$Arch/$MAPFILE"
>             LDOPTIMFLAGS='-O'
>             LDDEBUGFLAGS='-g'
> #
>             POSTLINK_CMDS=':'
> #----------------------------------------------------------------------------
>             ;;
>         maci)
> #----------------------------------------------------------------------------
>             CC='gcc-4.0'
>             CFLAGS='-fno-common -no-cpp-precomp -fexceptions'
>           #  CLIBS="$MLIBS -lstdc++"
>             COPTIMFLAGS='-O3 -DNDEBUG'
>             CDEBUGFLAGS='-g'
> #
>             CXX=g++-4.0
>             CXXFLAGS='-fno-common -no-cpp-precomp -fexceptions -arch i386'
>             CXXLIBS="$MLIBS -lstdc++"
>             CXXOPTIMFLAGS='-O3 -DNDEBUG'
>             CXXDEBUGFLAGS='-g'
> #
>             FC='g95'
>             FFLAGS='-fexceptions'
>             FC_LIBDIR=`$FC -print-file-name=libf95.a 2>&1 | sed -n
> '1s/\/*libf95\.a//p'`
>             FLIBS="$MLIBS -L$FC_LIBDIR -lf95"
>             FOPTIMFLAGS='-O'
>             FDEBUGFLAGS='-g'
> #
>             LD="$CC"
>             LDEXTENSION='.mexmaci'
>             LDFLAGS='-Wl,-flat_namespace -undefined suppress'
>             LDFLAGS="$LDFLAGS -bundle
> -Wl,-exported_symbols_list,$TMW_ROOT/extern/lib/$Arch/$MAPFILE"
>             LDOPTIMFLAGS='-O'
>             LDDEBUGFLAGS='-g'
> #
>             POSTLINK_CMDS=':'
> #----------------------------------------------------------------------------
>             ;;
>     esac
> #############################################################################
> #
> # Architecture independent lines:
> #
> #     Set and uncomment any lines which will apply to all architectures.
> #
> #----------------------------------------------------------------------------
> #           CC="$CC"
> #           CFLAGS="$CFLAGS"
> #           COPTIMFLAGS="$COPTIMFLAGS"
> #           CDEBUGFLAGS="$CDEBUGFLAGS"
> #           CLIBS="$CLIBS"
> #
> #           FC="$FC"
> #           FFLAGS="$FFLAGS"
> #           FOPTIMFLAGS="$FOPTIMFLAGS"
> #           FDEBUGFLAGS="$FDEBUGFLAGS"
> #           FLIBS="$FLIBS"
> #
> #           LD="$LD"
> #           LDFLAGS="$LDFLAGS"
> #           LDOPTIMFLAGS="$LDOPTIMFLAGS"
> #           LDDEBUGFLAGS="$LDDEBUGFLAGS"
> #----------------------------------------------------------------------------
> #############################################################################
>
>
>
>
>
> On Dec 27, 2007 12:19 PM, Ivan Vanney <[log in to unmask]> wrote:
>
>> Hi, I installed Matlab (for 32 and 64 bits,both them) on CentOS 5.1 for 64
>> bits, when I try to install SPM5 I get the next error:
>> [root@universi-de562e src]# make && make install
>> _____________________________________________________________
>>
>>         Linux compilation (x86-64) - using gcc
>> _____________________________________________________________
>>
>> mex COPTIMFLAGS='-O3 -funroll-loops -fPIC -march=x86-64 -mfpmath=sse'
>> spm_sample_vol.c spm_vol_utils.mexa64.a
>> /usr/local/bin/ld: cannot find -lstdc++
>> collect2: ld returned 1 exit status
>>
>>     mex: link of 'spm_sample_vol.mexa64' failed.
>>
>> make: *** [spm_sample_vol.mexa64] Error 1
>> ______________________________________________________________________________
>>
>>
>> I tried doing
>>
>>    - Adding the path:
>>       - Type: PATH=/usr/local/matlab/bin:$PATH
>>    - Creating a Link:
>>       - Enter your local binary direcotry: cd /usr/local/bin
>>       - Create the link: ln -s /usr/local/matlab/bin/mex
>>       - (Note: Creating a link in /usr/local/bin requires root
>>       privileges).
>>
>> According with the wiki... but still dont work, someone experienced this
>> problem before?
>> thnx.
>>
>> --
>> Ni guerra entre pueblos ni paz entre clases.
>
>
>
>
> --
> Ni guerra entre pueblos ni paz entre clases.
>