I am getting the error “The procedure entry point crc32_z could not be located in dynamic library gvc.dll” when attempting to run my program.
I am running Windows 10, linking to Graphviz 12.2.1 lib’s, 64-bit. Compiling with MSVC 2017. I am using the pre-compiled files, I don’t have the source and I did not compile it myself.
Attached is a screen shot of the GVC.DLL dependencies. “crc32_z” is defined in ZLIB1.DLL, not GVC.DLL. Why is it looking for crc32_z in the wrong place?
I don’t know much about Windows linking, but my guess as to what is happening is that your Zlib is < 1.2.9. The pre-built binaries are probably built against a recent Zlib, taking the first branch of the following during compilation:
When you try to use this at runtime, it tries to dynamically load crc32_z but can’t find this symbol in your Zlib. The dynamic linker that’s responsible for connecting these things has no idea where the crc32_z symbol is supposed to come from. It just knows it’s undefined and it needs to find a definition of it somewhere.
(As I said, this is all just guesswork and may be totally wrong.)
I got gvc.dll and zlib1.dll from downloading ver. 12.2.1 from the Graphviz website. The entry point expansion is from a program called Dependency Walker (Microsoft).
The zlib1.dll I am using was included from the installation of Graphviz 12.2.1, which was downloaded from the Graphviz website. It is ver. 1.3.1.
It appears that “crc32_z” is not defined in the zlib1.dll.
I just downloaded the zip files for all permutations of Debug/Release and 32/64 bit from 12.2.1 · graphviz / graphviz · GitLab and analyzed them with dumpbin¹. crc32_z seems to be defined in all of them:
¹ my-dumpbin just points to the installed dumpbin at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64\dumpbin.exe
Good news: DUMPBIN does show that the entry point “crc32_z” is indeed present in zlib1.dll (the version that was included in the Graphviz 12.2.1 installer package):
> you have an older version of zlib1.dll somewhere in your PATH
Excellent suggestion. However, I ran a batch job that looks for “zlib1.dll” in all directories in the PATH. Alas there aren’t any instances of zlib1.dll in any of these directories.
As a matter of fact, if I delete or rename the version of zlib1.dll that is in the same directory as my program, then the program complains it can’t find zlib1.dll. So I am indeed calling on the right one.
For those who have the source, who is calling the function “crc32_z”? Is it gvc.dll or someone else? Because the error message implies that whoever is calling it, is looking for it in gvc.dll.
The error message is quite ambiguous, but it most certainly means that the entry point crc32_z which is referred to from gvc.dll is not found, i.e., the dynamic linker is resolving symbols “in gvc.dll” when it ascertains “Entry point crc32_z not found".
> Then I guess you need to add F:\Program Files\Graphviz\bin to your PATH
Somehow it looks like the version of zlib1.dll that I thought I had copied from Graphviz, was in fact different. The Graphviz one is ver. 1.3.1. The one in my program library was 1.2.8. I don’t know where that one came from. I re-copied the Graphiz one, and now I’m getting a different error that might not be related to Graphviz.
Thank you all for your help in walking through this.