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

The Archive Base Latest Questions

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

I am doing some C programming for school and I have found myself reusing

  • 0

I am doing some C programming for school and I have found myself reusing libraries that I have created, over and over again (stacks, user input, error handling, etc).

Right now, my personal SVN directory structure looks like this:

trunk/
|-- 2520
|   `-- assignments
|       |-- A2
|           |-- Makefile
|           |-- README
|           |-- calculator.c
|           |-- calculatorlib.c
|           `-- calculatorlib.h
`-- libs
    |-- misc
    |   |-- errorlib.c
    |   |-- errorlib.h
    |   |-- userinputlib.c
    |   `-- userinputlib.h
    `-- stacks
        |-- stacklib.c
        `-- stacklib.h

Some of these files (userinputlib and errorlib) get used in almost every project I work on for obvious reasons. I want to be able to include these files in a project’s workspace (2520/assignments/A2) without having to copy the files because I don’t want to manage to copies of a file and I don’t want to check in two copies of the same file in SVN.
I would like to have the library files in the project workspace so my Makefile works without having to do to much manual configuration (or hard-coding paths).

At first, I thought about symbolic links (which SVN and tar support) but I can’t seem to compile my assignment given my headers in another directory.

I can manually compile each header to an object file and do the final linking, but I’m not sure how to do this in a Makefile automatically.

Any help or any alternative to how I have my environment setup is appreciated.

Thanks!

EDIT: I forgot to mention that I have searched Google and have found a few pages describing automatic dependency generation (perhaps I want this?) using gcc -MM and I have read over the GNU Make manual but nothing jumped out at me.

  • 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-12T19:22:04+00:00Added an answer on May 12, 2026 at 7:22 pm

    Use could use subversion’s externals feature to link a dynamic copy of the libs tree as a subdirectory of your project.

    But in the end it may be better to just use a copy (a subversion copy, so it would effectively be a branch of the library code), so that you don’t need to worry about changes to the library affecting existing projects, and can merge changes around as needed.

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

Sidebar

Ask A Question

Stats

  • Questions 203k
  • Answers 203k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer How does one find out the exact path of their… May 12, 2026 at 8:37 pm
  • Editorial Team
    Editorial Team added an answer try to use (throws Exception instead of ..) protected Object… May 12, 2026 at 8:37 pm
  • Editorial Team
    Editorial Team added an answer I'd use Clirr for that, a binary compatibility checker. From… May 12, 2026 at 8:37 pm

Related Questions

I am currently in my final year at school, studying for a Higher National
I am part of a high school robotics team, and there is some debate
I am doing some socket programming in C, and trying to wrestle with byte
I am currently doing some socket programming using C/C++. To be able to use
I am interested in doing some Collective Intelligence programming, but wonder how it can

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.