Eclipse CDT Linking to shared Library

12,589

Solution 1

I had the some problem, the solution:

Insert a variable environment DYLD_LIBRARY_PATH = ${workspace_loc:/sharedlib/Debug} into run configuration.

Solution 2

When I try to run a program which uses another shared-link library, also I want to run the program inside the eclipse. Here is what I did:

Insert a variable environment LD_LIBRARY_PATH="where you shared lib file is" in "Run/Debug Settings" and problem solved.

Share:
12,589

Related videos on Youtube

epelc
Author by

epelc

Updated on September 14, 2022

Comments

  • epelc
    epelc over 1 year

    I have two projects in eclipse CDT on my Mac. One is a shared library the other is a C++ project that uses the shared library. I am trying to use the shared library, and have gotten it to compile but it will not run. When i try to run it i get a image not found error.

    I haven't been able to figure out how to add my library to the path directory or ld_library_path or what every other path I need to add it to so that it can be linked to at run time. I already added it as a reference in my other project which has correctly setup run time linking for me but i need help setting up run time linking.