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 6169529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:52:22+00:00 2026-05-23T22:52:22+00:00

When I create my own non-standard path for library files (say, ~/lib) I can

  • 0

When I create my own non-standard path for library files (say, ~/lib) I can run ldconfig -n ~/lib and this directory is added to the list of locations ld uses to search for non-standard libraries.

Is there a similar switch for GCC/G++ (or an appropriate gcc/++ config manager) related to include directories, and if so, what? I’m aware the -I flag will include non-standard directories, butI’d rather not have to go through all my projects and have to add all forms of magic to the makefiles to make them work — and then find that these changes are (of course) non-portable to any other system this code is built on (with collaborators, etc), so editing the makefile isn’t really an option….

Edit: Note that my ignorance assumes this solution is gcc/++ only. I’m happy for any solution, however, so if there’s a method that abuses some property of ldconfig or whatever, I’m not adverse to it!

  • 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-23T22:52:23+00:00Added an answer on May 23, 2026 at 10:52 pm

    Generally, just do man gcc. You’ll need -L <path> flag if you are willing to change the Makefiles. There’s also a solution similar to ldconfig – to use LIBRARY_PATH env. variable.

    Similarly, there’s CPLUS_INCLUDE_PATH and C_INCLUDE_PATH and CPATH which are declaring a list of directories to search for header files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wish to create own events and dispatch them. I never done this before
I wanted to create my own Python exception class, like this: class MyException(BaseException): def
I've been trying to deal with some delimited text files that have non standard
This situation arises from someone wanting to create their own pages in their web
I want to create own filetype to save objects in my app. Basically, I
In Wordpress it's possible to create own WP Querys for the loop. An example
I create my own FrameworkElement and override VisualChildrenCount{get;} and GetVisualChild(int index) by returning my
How do you create your own custom moniker (or URL Protocol) on Windows systems?
I would like create my own collection that has all the attributes of python
How do I create my own primitive? For example an integer that has a

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.