user1365875
user1365875

Reputation: 149

Cannot resolve unit name in Delphi

I'm a beginner here and am trying to get to grips with some code someone developed for me in Delphi in Rad Studio. I can't work out if when the developer sent the code he left something out or he used classes from elsewhere that I need to download from somewhere.

Either way, there are red squiggly lines underneath most of the 'uses' and the program won't run. These are the uses (some are missing, some not):

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, Vcl.Menus, 
  System.Classes, Vcl.Graphics, Vcl.Imaging.JPEG, Vcl.Controls, Vcl.Forms, 
  Vcl.Dialogs, Vcl.ComCtrls, Winapi.ShlObj, Vcl.StdCtrls, Vcl.ExtCtrls, 
  cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore, 
  cxPCdxBarPopupMenu, cxShellCommon, cxButtons, cxCustomData, cxFilter, cxStyles,
  cxDataStorage, cxEdit, cxTextEdit, cxCalendar, cxContainer, cxSpinEdit,  
  cxMaskEdit, cxDropDownEdit, cxData, cxMemo, dxSkinVS2010, dxSkinscxPCPainter,
  CoolTrayIcon, AdvEdit, AdvEdBtn, HotKeyManager, uPrintersMonitor

Any help will be massively appreciated. Also when I open the project it does say 'Class xxxxxx not found. Ignore the error and continue?

Upvotes: 2

Views: 12902

Answers (3)

Jan Doggen
Jan Doggen

Reputation: 9096

He used these external packages:

Make sure these are all installed on the system (check Components/Install Packages in the IDE to see if they're already there).

Upvotes: 10

David Heffernan
David Heffernan

Reputation: 612884

The cxXXX and dxXXX units are units from devExpress. You need to install the appropriate devExpress code/components to resolve this.

This may involve a purchase if you don't already have the devExpress components. In which case you will need to talk to the developer to find out which specific components are used by this project.

The AdvXXX units are TMS components. Same advice as for devExpress.

As for HotKeyManager, CoolTrayIcon, uPrintersMonitor, I suspect that they are part of the project that you have inherited. Update: I guessed wrong, the first two are 3rd party, linked to from Jan's answer.

One final point. I don't understand why you are asking here as your first port of call. If a developer has produced some code for you, it is that developer that you should be talking to. We can guess and reverse engineer to a degree, but the author of the code should know what its dependencies are.

Upvotes: 3

Bogdan Doicin
Bogdan Doicin

Reputation: 2416

The coder gave you the source code, but he didn't give you the additional libraries and packages, or he did give you the additional libraries and packages but you didn't install them in your Delphi (e.g. CoolTrayIcon is a package relating to program operation in SysTray).

Also when I open the project it does say 'Class xxxxxx not found. Ignore the error and continue?

The answer is, of course, no. Install the missing packages, get the additional libraries he used and add them to your project and everything should work fine.

Upvotes: 0

Related Questions