Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I am trying to link matlab libraries with my sourcecode in ubuntu 11.04. compilation is fine but the linking part fails as follows: /bin/ld:warning: libstdc++.so.5 needed by libmx.so not ...
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    3

    Thumbs down Linking matlab libraries with source in linux

    Hi,

    I am trying to link matlab libraries with my sourcecode in ubuntu 11.04. compilation is fine but the linking part fails as follows:

    /bin/ld:warning: libstdc++.so.5 needed by libmx.so not found;
    libut.so:undefined reference to 'cxa_throw at CXXAB1_1.2'
    libustdio.so: undefined reference to 'std::ios_base::Init::~Init() at GLIBCPP_3.2

    and similar undefined references..

    I am using gcc-4.6 compiler and i could see that my system folder has libstdc++.so.6 in /usr/lib folder whereas matlab looks for libstdc++.so.5.

    Any ideas will be very helpful.

    Sangeetha

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,970
    The 4.6 compiler is so new, that it is not widely available. In any case, your Matlab code needs a revision earlier of libstdc++, so since you are using 4.6, my recommendation is to install 4.5 and use that. You can have multiple versions of gcc and associated libraries installed on a system without problems, although you may need to change your Makefile(s) to use gcc45 instead of the installed gcc (4.6).
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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