Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5930911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:37:12+00:00 2026-05-22T14:37:12+00:00

The gcc man page says, Order does matter when you use several options of

  • 0

The gcc man page says, “Order does matter when you use several options of the same kind; for example, if you specify -L more than once, the directories are searched in the order specified.”

However, are these -L directories searched before the system directories (e.g., those that ld normally uses)?

I have the case that I have two libraries of the same name, one in a system location and another in my working directory, and I want to use mine, but cannot figure out how to verify my version is being used.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:37:13+00:00Added an answer on May 22, 2026 at 2:37 pm

    Try “ldd /bin/your/application”. E.g:

    ldd `which bash`
    linux-vdso.so.1 =>  (0x00007fff46eda000)
    libncurses.so.5 => /lib/libncurses.so.5 (0x00007facdd618000)
    libdl.so.2 => /lib/libdl.so.2 (0x00007facdd414000)
    libc.so.6 => /lib/libc.so.6 (0x00007facdd090000)
    /lib64/ld-linux-x86-64.so.2 (0x00007facdd863000)
    

    In general there are 3 options how one can specify which library to use for your binary:

    1. Setting LD_LIBRARY_PATH environment variable before starting your executable
    2. RPATH linker option (see other my questions/answers on SO to find out more about this option)
    3. Add your shared library to all other system libraries.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From man gets : Never use gets(). Because it is impossible to tell without
I want to view function man pages in gcc on Ubuntu. For instance, say
can any body explain me why we use -m flag in gcc ? I
From the XDrawString man page it seems that it aceepts signed 32 bit x
I run man gcc | grep -L I get Usage: grep [OPTION]... PATTERN [FILE]...
I've already read the gcc manpage, but I still can't understand the difference between
GCC is a very well respected multi-language compiler (from what I've gathered). One thing
gcc I am just getting back into c programming and I am just practicing
GCC's recent support for atomic operations (as described here ) is great, and is
gcc 4.4.2 c89 I have a wave file: 8000 Hz 16 bit I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.