It does indeed compile under x86_64. I tried with i386 and it does not compile.
d:\lazarus-projekty\test-440\01_lpr>fpc wininet.lpr
Free Pascal Compiler version 3.2.3-1412-gd6d047d8a4-dirty [2025/05/20] for i386
Copyright (c) 1993-2024 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling wininet.lpr
Linking wininet.exe
wininet.lpr(10,1) Error: Undefined symbol: DEBUGSTART_$WININET
wininet.lpr(10,1) Error: Undefined symbol: DEBUGEND_$WININET
wininet.lpr(10,1) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
Error: d:\fpcupfix\fpc\bin\i386-win32\ppc386.exe returned an error exitcode
d:\lazarus-projekty\test-440\01_lpr>fpc -Px86_64 wininet.lpr
Free Pascal Compiler version 3.2.3-1412-gd6d047d8a4-dirty [2025/05/20] for x86_64
Copyright (c) 1993-2024 by Florian Klaempfl and others
Target OS: Win64 for x64
Compiling wininet.lpr
Compiling wininet.pas
Linking wininet.exe
16 lines compiled, 0.1 sec, 39744 bytes code, 1556 bytes data
However, if I use an external linker (-Xe option) under i386 it also compiles.
d:\lazarus-projekty\test-440\01_lpr>fpc -Xe wininet.lpr
Free Pascal Compiler version 3.2.3-1412-gd6d047d8a4-dirty [2025/05/20] for i386
Copyright (c) 1993-2024 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling wininet.lpr
Compiling wininet.pas
Linking wininet.exe
16 lines compiled, 0.8 sec
My guess is that the cause may be the order of the paths given to the compiler (in the configuration file and via the -Fu or -Fo option).