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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:57:50+00:00 2026-05-25T09:57:50+00:00

I never programmed in a computer without access to install libraries as root so

  • 0

I never programmed in a computer without access to install libraries as root so I’m not really sure of what should I do to use libraries that I do not install in the usual places.

Usually, when I have admin priviledges I’d do the usual:

./configure 
make 
make install

to install the library. Then I’d do the common #include <library> and compile with (actually this is done in my makefile):

gcc -c file1.c
   gcc -c file2.c
   ...
   gcc file1.o file2.o ... -o executable -llibrary 

How should I deal with a library that was installed in my home folder? Suppose I install it with:

./configure --prefix=$HOME
make 
make install

And now I have directories like $HOME/include, $HOME/lib and $HOME/share, etc… how should I include the lib, compile and link the binaries?

  • 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-25T09:57:51+00:00Added an answer on May 25, 2026 at 9:57 am

    Just add

    -L/home/yours/subdirforlibs
    

    to the linker’s command line to instruct it to look in that directory for libraries.

    The directory options for gcc are explained here

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

Sidebar

Related Questions

I have never programmed in C and have not programmed in C++ for a
I've never programmed using C or whatever but I use this site a lot
When verbally talking about methods, I'm never sure whether to use the word argument
I've programmed for a while in Java and .Net, but never really used C
I've programmed for six years, and in that time, I've never used a PHP
I have never programmed web sites. I know that I can create web sites
I have never programmed a gadget for Vista or Seven, but I would like
I've programmed C and C++ for a long time and so far I've never
As a mostly self-taught programmer, I have never really had anyone explain why certain
1st disclaimers: I'm not a programmer, never was had never been taught higher math

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.