Placement of -l options matters in GCC

I ran into an interesting puzzle with GCC this afternoon when trying to compile the code below. The first command that I used to compile the code failed: After about one hour of trying to resolve this error, I was resigned to reading the documentation. This is what I found from the section Options for …