What Happens When I Build QB64-SDL?

qb64-sdl\internal\c\makelib.bat calls qb64-sdl\internal\c\bin\g.exe with these options:

  • -fstack-check
  • -c
  • -w
  • -Wall
  • -I .\i
  • libqbx.cpp
  • -o libqbx.o

Whenever we compile an application with QB64 we are actually executing the commands in qb64-sdl\internal\c\makeline.txt which are two calls to qb64-sdl\internal\c\bin\g.exe. The call has the following options:

  • -fstack-check
  • -w
  • -Wall
  • -I .\i
  • -I ..\..\
  • -L .\l
  • qbx.cpp
  • libqbx.o
  • -mwindows
  • .\i686-w64-mingw32\lib\libimm32.a
  • -lwinspool
  • -lmingw32
  • -ln
  • -lmix
  • -limg
  • -lttf
  • -lSDL
  • -s
  • -o ..\..\

The second call uses similar options:

  • fstack-check – Checks that stack references are within the boundaries of the stack.
  • w – Prevents all warning messages.
  • Wall – Turns on a number of warning flags.
  • -I .\i
  • -I ..\..\
  • -L .\l
  • qbx.cpp
  • libqbx.o
  • -mwindows
  • .\i686-w64-mingw32\lib\libimm32.a
  • -lwinspool
  • -lmingw32
  • -ln
  • -lmix
  • -limg
  • -lttf
  • -lmn
  • -lSDL
  • -s
  • -o ..\..\

Thanks

I owe special thanks to RhoSigma for his insights into the QB64 SDL build process.