1
votes

I compiled using the following two commands:

  • Fpc -Se test.pas
  • Fpc test.pas -Se

What is the difference between these two ways to compile?

When do I put switches in? Before or after the source code?

1
Are you observing a difference in the results? The flag means that the compiler will stop after finding the first compilation error in the file. When I tried it, it didn't matter for -Se. Whether ordering does matter may depend upon the flag and would be described in the documentation. See the manual page for fpc. - lurker
Or use verbose output -va to see the order of events - Marco van de Voort
You could always type fpc -? at the command prompt and see what it says. - Ken White

1 Answers

1
votes

Free pascal does not check order of flags. I've tried for some other flags and I observed no difference in compilation. However, looking at the documentation you will notice that any flags are placed before the file that is to be compiled.

Below are examples from the documentation: ftp://ftp.freepascal.org/pub/fpc/docs-pdf/user.pdf

fpc -Fuc:\pp\NNN\units\i386-go32v2\rtl hello

fpc -g hello.pp

fpc -n -Fu/home @cfg -Fu/usr foo.pp