It won't work that way.https://forum.lazarus.freepascal.org/index.php?topic=17572.0
Have you added fpsTypes to your uses list?