X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Tue, 27 Dec 2011 21:29:04 -0500 Message-Id: <201112280229.pBS2T4GL024623@envy.delorie.com> From: DJ Delorie To: djgpp AT delorie DOT com In-reply-to: <61c5267e-a10f-48ef-9db0-c667c4d48474 AT n13g2000prf DOT googlegroups DOT com> (message from jimm on Tue, 27 Dec 2011 17:55:07 -0800 (PST)) Subject: Re: pthreads compilation error References: <032816da-42c9-45e7-87f2-516da6fd7455 AT q8g2000yqa DOT googlegroups DOT com> <61c5267e-a10f-48ef-9db0-c667c4d48474 AT n13g2000prf DOT googlegroups DOT com> Errors-To: nobody AT delorie DOT com > I thought -lpth as a switch should be before the files to be included > in compilation since it is a switch. I thought that if it was at the > end it would be interpreted as a filename. GCC doesn't interpret command line options that way. The -l option means "the next name is a library" and it's a shortcut for a much more lengthy name you'd have to use, so it goes in where the library would have gone. There are other options that are order-senstitive too, since yes, the GNU linker is order-sensitive.