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

  • SEARCH
  • Home
  • 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 128001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:33:58+00:00 2026-05-11T05:33:58+00:00

This question is similar to this one , but not a duplicate because I’m

  • 0

This question is similar to this one, but not a duplicate because I’m asking about issues not discussed in that question.

I have a client-server project in Delphi 7 with the following directory structure:

\MyApp   \MyClientApp   \MyServerApp   \lib 

There are 2 actual Delphi projects (.dpr), one each in the MyClientApp and MyServerApp folders.

The lib folder has .pas units that have common code to the client and server apps. What I’m wondering is if I should include those .pas files in the client and server projects? Or should I create a package in the lib folder which includes those units? Or should I just leave the .pas files sitting in the lib folder and not add them to any app/package?

What are the pros/cons of each approach? Which way is ‘best’? Is there any issue with having those units from the lib folder be included in more than one project?

Right now the units in the lib folder are not a part of any app/package. One disadvantage of this is that when I have my client app open in Delphi, for example, and I want to search in all files in the project for something, it doesn’t also search in the units in the lib folder. I get around this by opening those units and doing a find in all open files, or using grep search (but I’d prefer a better solution).

I would also greatly prefer a solution where I will not have to go and open some separate package and recompile it when I make changes to those files in the lib folder (is this where I should use a project group?).

  • 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. 2026-05-11T05:33:58+00:00Added an answer on May 11, 2026 at 5:33 am

    Sharing units between applications always carries the risk of incompatible changes done in one application that breaks the other. On the other hand, making copies of these units is even worse, so your approcach of moving them to their own subdirectory at least adds a psychological barrier to changing them without considering other programs.

    As for adding them to the project files: I usually add some units which I frequently access (either for expanding or for reference) from the IDE to the project, and leave others out for the compiler to pick using the search path. I do that on per project basis, that means, some units may be part of several projects, why not?

    Putting them into a package only makes sense, if you actually want to create a package based application, otherwise, why bother?

    For more info on how I organize my projects and libraries, see http://www.dummzeuch.de/delphi/subversion/english.html

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

Sidebar

Related Questions

I have a question very similar to this one but the answer does not
I found a question that was very similar to this one, but using features
Similar question as this one but for a Microsoft Environment. Email --> Exchange Server
Similar questions to this one have been asked but none seem to address my
I've seen a few similar questions to this one, but none that were quite
I have a similar question to this one SQL products/productsales I want to do
This question is about a whole class of similar problems, but I'll ask it
This is admittedly similar to (but not a duplicate of) Comparison of full text
My question is similar to this one but I'm having some problems with the
Liu Chang asked a very similar question to this one here, Linux equivalent of

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.