Here's a trick that makes small exes. It won't be as small as crinkler,
but it is fairly easy to set-up, and you need no other resources except what's packaged with fbc 0.18.2.
Assume that FreeBASIC is installed at:
C:\FreeBASIC\
and that our "trick" is installed at:
F:\tinyfb\
Create some directories like so:
mkdir F:\tinyfb\
mkdir F:\tinyfb\bin\
mkdir F:\tinyfb\bin\win32\
mkdir F:\tinyfb\lib\
mkdir F:\tinyfb\lib\win32\
Copy two files from C:\FreeBASIC\ to our new directory:
copy C:\FreeBASIC\bin\win32\i386pe.x F:\tinyfb\bin\win32\i386pe.x
copy C:\FreeBASIC\bin\win32\ld.exe F:\tinyfb\bin\win32\ld.exe
Go into F:\tinyfb\lib\win32\ and create some empty object files just to make the fbc.exe command line happy:
F:
cd \tinyfb\lib\win32\
echo REM > crt2.bas
fbc -c crt2.bas
copy crt2.o crtbegin.o
copy crt2.o crtend.o
copy crt2.o fbrt0.o
cd ..\..
Now let's create our example:
'' hello.bas
#include once "windows.bi"
function WinMainCRTStartup cdecl _
alias "WinMainCRTStartup" () as integer
Messagebox( 0, "Small EXE example", "Hello", MB_OK )
return 0
end function
Finally, the last two steps are to compile, then to link our exe:
fbc -c hello.bas
fbc hello.o -s gui -prefix F:\tinyfb -p "C:\FreeBASIC\lib\win32"
The "-prefix F:\tinyfb" option tells fbc where to pick up the extra bits of code. Since we provided empty object files, no size is added. The "-p" options tells fbc where to find all the import libs.
For me, this compiles to 2560 bytes.
I know this is an old-ish thread, but I meant to post something here after I saw this, but never did.
Also, if you are making a Windows App and are planning to use MSVCRT, but want to make sure you don't get any fb-runtime stuff, the fbc command line option '-nodeflibs' was updated not to include 'fbrt0.o'. Don't know if that's any help, but thought I would mention.