@echo off
SET THEFILE=C:\Users\user\Desktop\Lazarus-2021\PJ_1\project1.exe
echo Linking %THEFILE%
C:\FPC\3.0.4\bin\i386-win32\ld.exe -b pei-i386 -m i386pe  --gc-sections  -s --subsystem windows --entry=_WinMainCRTStartup    -o C:\Users\user\Desktop\Lazarus-2021\PJ_1\project1.exe C:\Users\user\Desktop\Lazarus-2021\PJ_1\link.res
if errorlevel 1 goto linkend
C:\FPC\3.0.4\bin\i386-win32\postw32.exe --subsystem gui --input C:\Users\user\Desktop\Lazarus-2021\PJ_1\project1.exe --stack 16777216
if errorlevel 1 goto linkend
goto end
:asmend
echo An error occurred while assembling %THEFILE%
goto end
:linkend
echo An error occurred while linking %THEFILE%
:end
