Matlab Mex file not linking library

Front page Forums Plug-ins Matlab Mex file not linking library

This topic contains 2 replies, has 2 voices, and was last updated by  Matthaios 1 year, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1398

    Matthaios
    Member

    Dear community/developers,

    I am trying to compile mex files that use the Paralution library in a Linux (Ubuntu14.04) system.
    I compiled the given example in ‘paralution/src/plug-ins/MATLAB’ but when I run it in Matlab I get:

    Invalid MEX-file ‘/paralution-1.1.0/src/plug-ins/MATLAB/paralution_pcg.mexa64′:
    libparalution.so: cannot open shared object file: No such file or directory

    My guess is that the Paralution library is not properly linked. I used the make file provided to compile and also did it manually from within Matlab, but got the same error in both cases.
    Also I have added the Paralution library path to the system’s libraries (I can verify it because the non-matlab examples are running fine).

    Anyone has any suggestions?

    Thanks,
    Matthaios

    #1400

    Dimitar
    Member

    Hi Matthaios,

    Perhaps the MATLAB is changing the lib path…can you copy the .so file to the same directory as the executable/mexa64 file? I hope this will fix the issue.

    Best,
    Dimitar

    #1402

    Matthaios
    Member

    Hi Dimitar,
    It works if I copy the .so file to /lib folder of Linux :)
    Thanks for your reply,
    Best wishes,
    Matthaios

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.