Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Problem with MATLAB mex files with Ubuntu 11.04

  1. #11
    Join Date
    Jun 2011
    Beans
    2

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    I updated the mexopts.sh file, and I was able to compile my file. However, I'm still getting an error with the .mexa64 file:
    Code:
    ??? Invalid MEX-file '/home/cparmer/VarietyPack/Programming/Lessons/Mex/
    .mexa64':
    
    /home/cparmer/MATLAB/R2011a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by
    /home/cparmer/VarietyPack/Programming/Lessons/Mex/import_matrix.mexa64)
    ideas?

  2. #12
    Join Date
    Jun 2010
    Beans
    3

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    $ cd matlab/sys/os/glnx86

    $ sudo mv libgcc_s.so.1 libgcc_s.so.1.back
    $ sudo ln -s /lib/libgcc_s.so.1 libgcc_s.so.1
    $ sudo rm libstdc++.so.6 (this was already a symbolic link)
    $ sudo ln -s /usr/lib/libstdc++.so.6.0.9 libstdc++.so.6

    version numbers may differ

  3. #13
    Join Date
    Nov 2011
    Beans
    1

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    Hello,
    I have a similar problem with mex in ubuntu 11.4, Matlab 2009a. I have changed mexopts.sh file, and replaced g++ by g++-4.2, gcc by gcc-4.2. The warning about gcc compiler doesn't appear, but there is still error message as follows when I tried to compiled:
    >> make
    DT.c:27:1: warning: "INFINITY" redefined
    In file included from /usr/include/math.h:40,
    from DT.c:24:
    /usr/include/bits/inf.h:27:1: warning: this is the location of the previous definition
    /usr/bin/ld: cannot find -lgcc_s
    collect2: ld returned 1 exit status

    mex: link of ' "DT.mexglx"' failed.

    Any one can show me how to fix this error? Thanks.

  4. #14
    Join Date
    Aug 2009
    Beans
    2

    Re: Problem with MATLAB mex files with Ubuntu 11.04

    mohammadul, your solution works.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •