[fpc-pascal] Downloaded cross-compiler from Sourceforge - wiki incorrect?
Bo Berglund
bo.berglund at gmail.com
Thu Mar 23 09:25:50 CET 2023
I tried to add a cross-compiler for Win32 to my existing Lazarus 2.2.4
installation on Windows 10 x64.
So I followed the instructions on the fpc wiki:
https://wiki.freepascal.org/Cross_compiling#From_win64_to_win32
The link to SF from the Wiki got me to SF and I could download the cross exe I
needed.
But when I try to run it, Windows pops up a "Windows protected your PC" message:
"Microsoft Defender SmartScreen prevented an unrecognised app from starting.
Running this app might put your PC at risk."
There is a button "Don't run" and a link to more info that displays:
"Application:
lazarus-2.2.4-fpc-3.2.2-cross-i386-win32-win64.exe
Publisher:
Unknown publisher"
Now another button "Run anyway" is shown, so I did that and the install seemed
to work...
As described in the Wiki I selected to install into the same folder as I had
installed Lazarus 2.2.4 initially.
Then opened Lazarus 2.2.4 with my project and changed project options as
follows:
Compiler_Options/Config_and_Target/Target OS(-T): Win32
Everything else left as-is.
Now when I OK this, Lazarus pops up a message saying:
--------------------------------------
The current FPC has no config file. It will probably miss
some units. Check your installation of fpc.
--------------------------------------
When I hit the OK button another pop-up:
--------------------------------------
The project uses target OS=win32 and CPU=x86_64.
The system.ppu for this target was not found in the FPC
binary directories.
Make sure fpc is installed correctly for this target and the
fpc.cfg contains the right directories.
[OK]
---------------------------------------
So I followed the install instructions on the Wiki and wound up in this
non-working state...
What steps are missing that I must do?
Why does it not find the correct system.ppu?
I searched the install dir for system.ppu and found two here:
C:\Programs\Lazarus_2.2.4\fpc\3.2.2\units\i386-win32\rtl
C:\Programs\Lazarus_2.2.4\fpc\3.2.2\units\x86_64-win64\rtl
What I see is:
in C:\Programs\Lazarus_2.2.4\fpc\3.2.2\bin\ only x86_64-win64 exists
in C:\Programs\Lazarus_2.2.4\fpc\3.2.2\units these dirs exsist:
i386-win32
x86_64-win64
in C:\Programs\Lazarus_2.2.4\fpc\3.2.2\fpmkinst these dirs exsist:
i386-win32
x86_64-win64
It seems like the cross installer failed to install the cross binaries, why????
I must have done something seriously wrong...
Or could the problem be that Windows Defender has blocked all exe files from
being installed?
--
Bo Berglund
Developer in Sweden
More information about the fpc-pascal
mailing list