Jump to content
alogrep

system.zlib.pas(2958): E2065 Unsatisfied forward or external declaration: '@zcalloc'

Recommended Posts

Hello.

Everytime one updates Delphi, a calvary begins .

I had a perfect function 11.0. I made the latest update, and nothing works any longer.

I get these errors:

  [dcc32 Error] system.zlib.pas(2958): E2065 Unsatisfied forward or external declaration: '@zcalloc'
  [dcc32 Error] system.zlib.pas(2958): E2065 Unsatisfied forward or external declaration: '@zcfree'
  [dcc32 Fatal Error] Vcl.GraphUtil.pas(416): F2063 Could not compile used unit 'System.ZLib.pas'

Does anybody have any idea of how to fix this?

I also noticed that when in the IDE I often get an error thats says that it cannot save zlib.pass to the "_recovery" folder.

I got one result to my search that says that that maybe due to a third party component that uses zlib.pas , but I cannot find any component that does it. Besides, here it says that is Vcl.GraphUtil.pas that cannot be compiled b/c zlib is messed up.

Share this post


Link to post

Several parts of the included Delphi units make use of ZLib, but that is not the root of your problem. The real question is: why does the compiler want to compile Delphi units in the first place. This can happen when the Delphi source folders are part of the search path. So I suggest you inspect the Delphi library paths for any references to $(BDS)\Source and remove those.

Share this post


Link to post

Hello Uwe.

Well I added those paths (dto Source) because I was getting error like : could not compile  unit lasses, controls, extrctrls etc.

In fact I removed those paths and I get those errors again.

Share this post


Link to post

David what am I supposed to show? I have a project with 116 units. I build it and I get the error.

Share this post


Link to post

I have this in unit scope name (se attached (us.jpg).

And in both places these are the lines

(Under inherit values from Base in Unit scope Names, and in the top editable list in  Values form All configurations)

System;Xml;

Data;Datasnap;

Web;Soap;

Vcl;

Vcl.Imaging;

Vcl.Touch;

Vcl.Samples;

Vcl.Shell

 

us.jpg

Share this post


Link to post

Once I remove the Source directory from the library, I get these errors when building the project (attached errors.txt).

errors.txt

Share this post


Link to post

Have you deleted all dcu files in Win32\debug after removing those paths?

Share this post


Link to post

Oops. 

Use I thinnk I did a foolish thing. I deleted not only from win32 (as you SAID) but also from the win64!

I guess the only thing now is to re-install delphi?

Unit not found: 'System' or binary equivalents (.dcu)

Share this post


Link to post

Well I said Win32\Debug because that is the output folder you specified in your project. It is relative to your project directory.

 

Your answer implies that you deleted all dcu files from the Delphi library folder. So yes, that was extraordinary foolish. I also have no better plan than to re-install Delphi then.

 

BTW, your library path contains a weird entry at the end: 

Quote

"Directory of C:\programdata\NexusDB\NexusDB4\Library\Delphi11\win32"

I have no idea how that made it into that list.

 

Please note one rule: You should never be forced to compile the Delphi standard units. You may deliberately do so for one or another, but you should definitely know why. 

Share this post


Link to post

Thanks Uwe.

I spoiled my weekend. :classic_biggrin:

 

C:\programdata\NexusDB\NexusDB4\Library\Delphi11\win32

I put that because  that is where Nexusdb put its dcu's.

 

Share this post


Link to post
1 hour ago, alogrep said:

David what am I supposed to show? I have a project with 116 units. I build it and I get the error.

A minimal reproduction. The act of making one will likely show you what you did wrong. 

Share this post


Link to post
16 minutes ago, alogrep said:

C:\programdata\NexusDB\NexusDB4\Library\Delphi11\win32

I put that because  that is where Nexusdb put its dcu's.

If you look a bit closer you can see that this entry contains a "Directory of " at the beginning.

Share this post


Link to post

Hello. Here I am. Back to square 1. 

I removed thre previous installatiion of 11.1, I removed all directories.

I re-installed Delphi.

The unit scopes are the same as  before.  And I get the same rerror that I was gettig before (see attached image s1.jpg).

The compiler messages output is in the attached errors.txt.

All dcu's in C:\Program Files (x86)\Embarcadero\Studio\22.0\lib\win32\debug show the original date as they were included in the installation exe.  I am over_super_completely lost.

 

s1.jpg

errors.txt

Share this post


Link to post
Posted (edited)

Well, the problem is not that it cannot find unit Vcl.ExtCtrls.dcu, but that it states it cannot compile that unit (which is expected and as stated above ist is something we definitely don't want).

 

My guess is that your project or some 3rd party library contains a unit that is used by Vcl.ExtCtrls, but it doesn't match the one that comes with Delphi. You might want to scan the dcu output folder of your project and find dcu files that are also present in C:\Program Files (x86)\Embarcadero\Studio\22.0\lib\win32\debug or C:\Program Files (x86)\Embarcadero\Studio\22.0\lib\win32\release. When you found one or more, you have to search where they came from.

Edited by Uwe Raabe

Share this post


Link to post
2 hours ago, David Heffernan said:

Make that minimal reproduction already

That would be too easy.

Share this post


Link to post

I re-installed for the 4th time.

Before the installation, I removed any 22.0 directory reference.

Now I get the error

    Could not compile used unit 'nxdb'

nxdb is the Nexusdb unit (I have the DCU only version )

The nxdb is here

Directory of C:\ProgramData\NexusDB\NexusDB4\Library\Delphi11\Win32

17/12/2021  02:48 p. m.           612,434 nxdb.dcu
               1 File(s)        612,434 bytes

I have  C:\programdata\NexusDB\NexusDB4\Library\Delphi11\Win32 in the library path as well as in the 

project search path.

Why does it want to compile the dcu? 

I tried to check and unched the Use debug .dcu's, but I get the same result. What else can I do?

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×