To know all Free Pascal command line options run "fpc -help" from console.
There are a lot of them. The one that tells where units are is "-Fu<dir>". For example, for my Ubuntu/Linux the Lazarus Component Library (LCL) is at "-Fu/usr/lib/lazarus/0.9.30/lcl/*". Note the "*" at the end that means it should look at the subdirectories.
Also remember to tell the compiler it needs to use Object Pascal instead of Pascal by using "-Mobjfpc".
Bookmarks