On August 23, 2021 16:17:03 Bart via fpc-devel <fpc-devel@lists.freepascal.org> wrote:

On Mon, Aug 23, 2021 at 2:57 PM Tomas Hajny via fpc-devel
<fpc-devel@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?

Just move common.dll from SysWOW64 to system32. The file is placed wrongly by some installer.

Yuriy.


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to