[fpc-devel] Building trunk of today fails on Windows: Error: Invalid DLL C:\WINDOWS\system32\common.dll, invalid header size

Bart bartjunk64 at gmail.com
Mon Aug 23 15:19:55 CEST 2021


On Mon, Aug 23, 2021 at 2:57 PM Tomas Hajny via fpc-devel
<fpc-devel at lists.freepascal.org> wrote:

> The problem is that MS Windows employs a special trickery by which the
> path to c:\windows\system32 (almost surely in your PATH) translates to
> c:\windows\SysWOW64 _for_32-bit_binaries_ (only!). So in reality, that
> directory _is_ in your PATH.

Nice...

> If the referenced
> DLL is not found during compilation, the compiler tries to build the
> import library "blindly", just based on assumptions formulated in the
> source code.

So:
- 32-bit: it finds common.dll (thank you MS), which is the wrong one
for the intended purpose (functions not found?) the compilation fails
- 64-bit and arm-wince: it does not find common.dll (nor any of the
other ones), but it can construct an importlibrary based on the
sourcode and compilation succeeds (running a prgram that uses the unit
will fail, since the libraries are just not on my system)

Should I start the build process with a %PATH% that does NOT have
C:\Windows\system32 in it?

-- 
Bart


More information about the fpc-devel mailing list