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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:12:42+00:00 2026-05-29T18:12:42+00:00

I am trying to install a 3rd party package and I get a compile

  • 0

I am trying to install a 3rd party package and I get a compile error:

[DCC Error] fiile/line : E2003 Undeclared identifier: 'Windows'

which refers to this line:

wnd := Windows.GetFocus;

It seems fairly obvious that I don’t have my Unit Scopes right – but which do I need (and is there a general approach to find which use clause I need)?

I currently have

Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;
Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;Winapi;System.Win

[Update]

interface
uses
SysUtils, winapi.windows, Classes, Controls, ExtCtrls, Graphics, StdCtrls, 
Dialogs, IniFiles, winapi.messages, Forms, Math
{$IFDEF DELPHI6_LVL}
, Variants
{$ENDIF}
;

No uses in the impementation section.

[Upate]
I forgot to mention. I failed (in the same way) to install it on one laptop. Then I succeeded on a second. The trouble is that I’d rather have it on my desktop and after a fresh install of XE2 starter I get these problems.

  • 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-29T18:12:46+00:00Added an answer on May 29, 2026 at 6:12 pm

    Assuming that your uses names the Windows unit at all, it would appear to do so by naming the unit as Winapi.Windows. And so your code must also do so and be written as

    wnd := Winapi.Windows.GetFocus;
    

    When you use a unit by naming the fully scoped unit name, you must also use the fully scoped name in subsequent code in that unit.

    Now, if you want to use the name Windows then you must name the unit as Windows in the uses clause and let the unit alias setting do its job. If you imported the unit by naming it Windows then your original code will work.

    To be very clear:

    uses
      Winapi.Windows;
    

    is what you have now but you would need:

    uses
      Windows;
    

    for your code to compile.

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

Sidebar

Related Questions

When trying to install a package in R I get the following odd error
I'm trying load a 3rd party DLL but I get an error when attempting
Trying to install pear package and keep getting this strange error. Can you shed
Trying to install mysql2 gem on ruby 1.9.2 and I get this error: Installing
I've been trying to find the so-called lib folder, to install some 3rd-party tools
Trying to install the RMagick gem is failing with an error about being unable
When trying to install my 32bit service on a Windows 64bit machine my installer
I'm trying to install Laconica , an open-source Microblogging application on my Windows development
Trying to install mysql-python. Got following error. Got mysql and pythond already installed. Any
Trying to install either SDKs for 2.1 or 2.2 in Eclipse, I get the

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.