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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:09:28+00:00 2026-05-13T14:09:28+00:00

I have problem. I ll try to explain it. I have a unit which

  • 0

I have problem. I ll try to explain it.

I have a unit which has a class and may will have new functions.

D3BF4E849ACC45249B990F802EFB1F15\UnitFile1.pas
8DC8977E7A7B469AACFE3CC77CA7075E\UnitFile1.pas

Both of them have same class: IClass_1 = class

Im using code numbers for different versions of this file.

Another unit file (UnitFile2.pas) uses that unit file (UnitFile1.pas).

Also, second unit file (UnitFile2.pas) has different versions.

F94C439C822E490DB228F2C16EF2C190\UnitFile2.pas
14CEEFAFF1D64DDD8CBDEDD334D4A3FF\UnitFile2.pas

Both of them have same class: IClass_2 = class(IClass_1)

Now problem starts;

“F94C439C822E490DB228F2C16EF2C190\UnitFile2.pas”
needs
“D3BF4E849ACC45249B990F802EFB1F15\UnitFile1.pas”

“14CEEFAFF1D64DDD8CBDEDD334D4A3FF\UnitFile2.pas”
needs
“8DC8977E7A7B469AACFE3CC77CA7075E\UnitFile1.pas”

But file names are same (I need a system like this. So they are same). And in unit file, delphi doesn’t let me to write like that;

In file F94C439C822E490DB228F2C16EF2C190\UnitFile2.pas;
uses UnitFile1 in ‘D3BF4E849ACC45249B990F802EFB1F15\UnitFile1.pas’;

I hope i could tell my problem. How can i tell the compiler which unit file i want to use with its path? (Im using Delphi-7)

  • 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-13T14:09:28+00:00Added an answer on May 13, 2026 at 2:09 pm

    Give your unit names DIFFERENT names, you can then simply include both units in the project.

    Then use a unit alias in your project options to create a “virtual unit name” which resolves to one or other of these actual units. In units which “use” one or other of these reference them by the unit alias – the “virtual name”.

    e.g. in the dpr:

      uses
        ...
        UnitFile1a in '....\UnitFile1a.pas',
        UnitFile1b in '....\UnitFile1b.pas',
        ...
    

    In your units:

       uses
         UnitFile1;
    

    In your project options a unit alias that is either:

       UnitFile1=UnitFile1a
    

    OR

       UnitFile1=UnitFile1b
    

    You can then build your project with whichever “UnitFile1?” unit is appropriate by simply changing the unit alias.

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer After reading the question and some comments, it seems that… May 14, 2026 at 9:59 pm
  • Editorial Team
    Editorial Team added an answer GraphicsEnvironment.isHeadless() (see also the JavaDoc) May 14, 2026 at 9:59 pm
  • Editorial Team
    Editorial Team added an answer Yes. It drops the indexes. This can be verified: CREATE… May 14, 2026 at 9:59 pm

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.