Official fpc 3.0.4 don't build application for Haiku x86 (gcc7). You can't buid apps with Qt4pas library.
I made small patches for FreePascal 3.0.4. Now you can build pascal software for the current version of Haiku (hrev52025) 32bit hybrid (GCC7)
Demo Qt4pas in screenshots
Soon I will post patched fpc 3.0.4 (x86 gcc7) for download