GPS Library Compatibility with Others Framework

Is library gps ublox.h and gps nmea.h compatible with teensy 4.1 in platformIO project using framework arduino?

No it is not arduino based.
It uses chibiOS and is otherwise simple C++.