Results 1 to 4 of 4

Thread: Debugging existing CMake project - "error loading shared libraries: libmpc"

  1. #1
    Join Date
    Feb 2015
    Posts
    5

    Default Debugging existing CMake project - "error loading shared libraries: libmpc"

    I just installed QT creator and I have an existing program with tons of C++ source files that I compiled before using CMakeLists and make on my Linux machine. I opened that project on Qt and went to Debug->Start debugging, but I get an error message "error while loading shared libraries: libmpc.so.3: cannot open shared object file: no such file or directory". However, this doesn't make sense because when I used `make` before, I never got this error. Am I doing something wrong?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Debugging existing CMake project - "error loading shared libraries: libmpc"

    The run time environment your program finds itself in does not include libmpc.so. This is not the Qt library or Cmake's fault.
    Check that libmpc is available on your system.
    Check that the run environment in Qt Creator on the Projects tab contains what it should, particularly the LD_LIBRARY_PATH if libmpc is not in a system default library location.

  3. #3
    Join Date
    Feb 2015
    Posts
    5

    Default Re: Debugging existing CMake project - "error loading shared libraries: libmpc"

    The run time environment your program finds itself in does not include libmpc.so. This is not the Qt library or Cmake's fault.
    Check that libmpc is available on your system.
    Check that the run environment in Qt Creator on the Projects tab contains what it should, particularly the LD_LIBRARY_PATH if libmpc is not in a system default library location.
    Why do I need libmpc.so? I didn't need it when I compiled the project using `make`. When I tried to search for its location, I see lots of directories, but they all say `Permission denied` on the command prompt

    I also did not list the entire message in the OP. It is:
    /opt/apps/ossw/applications/gcc/gcc-4.6/sl6/libexec/gcc/x86_64-unknown-linux-gnu/4.6.3/cc1plus:-1: error: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Debugging existing CMake project - "error loading shared libraries: libmpc"

    Now that makes a difference: a compile time error, not a run time error. It is your compiler that requires libmpc to execute and cannot find it (libmpc is a normal dependency for GCC). This command would likely show "not found" libraries:
    Qt Code:
    1. ldd /opt/apps/ossw/applications/gcc/gcc-4.6/sl6/libexec/gcc/x86_64-unknown-linux-gnu/4.6.3/cc1plus
    To copy to clipboard, switch view to plain text mode 
    Reinstall this compiler and the libraries it depends on, or select a compiler that does work.

Similar Threads

  1. Replies: 1
    Last Post: 12th September 2015, 22:46
  2. cmake error with Failed to find "glu32" in ""
    By kennethadammiller in forum Qt Programming
    Replies: 1
    Last Post: 12th September 2013, 23:12
  3. Replies: 6
    Last Post: 25th June 2013, 21:13
  4. Replies: 1
    Last Post: 6th April 2012, 00:08
  5. Replies: 0
    Last Post: 20th November 2011, 12:41

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.