Makefile update ld_library_path




















Add a comment. Active Oldest Votes. There are two other options I can think of: Using. Improve this answer. JesperE JesperE Either you add it directly to all gcc and ld calls within your target rules, e.

Community Bot 1 1 1 silver badge. MioDeals MioDeals 31 3 3 bronze badges. Are you sure this works? Shivam Kaushik Shivam Kaushik 31 1 1 silver badge 7 7 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.

Learn more. Shared library, makefile. Library path Ask Question. Asked 9 years, 9 months ago. Active 9 years, 9 months ago. Viewed 4k times. Improve this question. Veronic Veronic 45 1 1 silver badge 4 4 bronze badges.

Add a comment. Active Oldest Votes. Improve this answer. Sergei Nikulov Sergei Nikulov 4, 21 21 silver badges 35 35 bronze badges.

If used right, it can be very useful, but very often — not to say, most of the time — people apply it in the wrong way, and that is were they are calling for trouble.

Yes, it is useful — if you apply it in the way it was invented for, like the three cases above. However, very often it is used as a crutch to fix a problem that could have been avoided by other means see below. There is the ldd command, that shows you which libraries are needed by a dynamically linked executable, e. To get an overview of libraries loaded at runtime, you can use the pldd command:. As you can see, there are two more. Note: pldd is originally a Solaris command, that usually is not available on Linux.

The best solution is on the top, going down to the last resort. In both cases, you can check with ldd, that your executable will find the right libraries at start-up see above.



0コメント

  • 1000 / 1000