The DataCAD Developer Network (DDN) is an online resource for information and support for DCAL® (DataCAD Applications Language) developers as well as anyone interested in creating fonts, toolbars, hatch patterns, or linetypes for use in DataCAD.

Moderator: pjdixit

#71705 by dhs
Tue Jun 20, 2017 6:04 pm
Just tried to look at DCAL for Delphi for the first time.
Tried to compile the sample HelloWorld project. Initially got an invalid output path, but once I fixed that up am now getting the following error when I try to build it:

[dcc32 Error] UInterfaces.pas(42): E2029 'UNIT' expected but 'LIBRARY' found

Probably a pretty basic error, but I haven't used Delphi for about 15 years and am not sure what I am doing wrong. Can somebody point me in the right direction?
I am using the free version of Delphi 10.2.

David H.
#71723 by Mark F. Madura
Fri Jun 23, 2017 8:49 am
Hello David,

What are the paths set to in your uses clause?
Code: Select all  //DCAL for Delphi Header Files
  UConstants in '../../Header Files/UConstants.pas',
  UInterfaces in '../../Header Files/UInterfaces.pas',
  UInterfacesRecords in '../../Header Files/UInterfacesRecords.pas',
  URecords in '../../Header Files/URecords.pas',
  UVariables in '../../Header Files/UVariables.pas';

Make sure these paths are valid.

#71724 by Mark F. Madura
Fri Jun 23, 2017 9:00 am
In UInterfaces, I think you'll also need to change the following in the uses clause:

- Graphics should be Vcl.Graphics
- Windows should be Winapi.Windows
#71727 by dhs
Fri Jun 23, 2017 4:11 pm
Thanks Mark.

The paths to these all looked ok, so I don't think that was the problem.
So I deleted my dcal for Delphi directory and re-installed it. I don't know what was wrong the first time (presumably I must have touched some other file when fixing up the out put path), but I have managed to get it to build (subject to a couple of things I need to to fix up - see below). I will look at it further when I get a chance.

I had to fix up my output path again. The installed files are pointing to a DataCAD 16 folder which I do not have. If I could make a suggestion, it would be nice if the DataCAD install did a replace on the paths in the sample files based on the installation directory. I was able to use a tool to do a global replace based on my directory and it appears to be all working ok, so I don't see why the install can't do something similar. The replace I did is shown below (based on my paths):


I also got an error "[dcc32 Fatal Error] UInterfaces.pas(5): F2613 Unit 'Graphics' not found." when I first tried to build it after fixing up the output path. I was able to fix this by adding vcl namespace prefix as shown below, but you might like to check as to why this is required but is not in your sample file (has there been a change to Delphi since the samples were created?).



Who is online

Users browsing this forum: No registered users and 1 guest

About DataCAD Forum

The DataCAD Forum is a FREE online community we provide to enhance your experience with DataCAD.

We hope you'll visit often to get answers, share ideas, and interact with other DataCAD users around the world.


Software for AEC Professionals Since 1984