Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Writing an external module to access from EDB
Tue, Oct 22 2013 8:46 AMPermanent Link

Adam Brett

Orixa Systems

I have written a couple of simple external modules for EDB.

Now I am trying to write one which will generate a PDF.

The idea is that a job will run regularly, create this PDF which will be in a shared folder so users can see a summary of data for activity on the server.

When I try to compile the Delphi code I get an error "unable to find Graphics.dcu".

I believe this is because my Delphi code is a DLL (not EXE) and therefore cannot use the "visual" parts of the VCL.

I have tried to exclude all references to visual stuff from this module, but it is there, in the third party code which generates the PDF.

Is there any way I can work around this, or am I making some basic mistake?
Tue, Oct 22 2013 9:21 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Adam

>When I try to compile the Delphi code I get an error "unable to find Graphics.dcu".
>
>I believe this is because my Delphi code is a DLL (not EXE) and therefore cannot use the "visual" parts of the VCL.

No reason why it can't have the visual aspects. I use to have a launcher stub that displayed a splash screen and then called a dll which had all the forms in it.

>I have tried to exclude all references to visual stuff from this module, but it is there, in the third party code which generates the PDF.
>
>Is there any way I can work around this, or am I making some basic mistake?

Pretty certainly its a mistake. Have you followed rule one of writing a dll - write as a standard app first, get it working then convert?

PDFs can contain images and I'm not sure how much of it is graphical in nature so its a good guess that just adding Graphics into the uses clause will fix things.

Mind you I have been wrong on plenty of occasions.

Roy Lambert
Thu, Oct 24 2013 8:45 AMPermanent Link

Adam Brett

Orixa Systems

Thanks Roy, Helpful as always.

It is good to know that it isn't a basic problem with what can or can't be in a DLL.

I'll try your suggestions. I already have an Win32 application version of the code working without problems, so I'll go back to this & try to convert it.
Thu, Oct 24 2013 10:46 AMPermanent Link

Uli Becker

Adam,

> When I try to compile the Delphi code I get an error "unable to find Graphics.dcu".

Maybe this link helps if you use XE2:

http://stackoverflow.com/questions/8797138/design-time-package-fails-to-build-file-not-found-graphics-dcu

Uli
Thu, Oct 24 2013 5:15 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Adam,

<< When I try to compile the Delphi code I get an error "unable to find
Graphics.dcu". >>

This is definitely a path issue - you should be able to use VCL components
in any DLL, including the external modules.

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Oct 28 2013 6:26 PMPermanent Link

Adam Brett

Orixa Systems

You were spot on as always Tim, Thanks. Not sure why new versions of Delphi don't put all the unit references in correctly. Useful to know.
Image