title: gcc/g++ parameter order
body: <p>i just compiled chironfs on my new ubuntu 12.10 server and got the following error:</p>
  
  <pre><code>gcc  -Wall -W -Wmissing-prototypes -g -O2 -DFUSE_USE_VERSION=25 -D_FILE_OFFSET_BITS=64 -I/usr/local/include -g -O2 -lm -lfuse  -o chironfs chironfs.o chiron-conf.o chirondbg.o chironfn.o  
  chironfs.o: In function `chiron_init':
  /root/chironfs-1.1.1/src/chironfs.c:2000: undefined reference to `pthread_create'
  chironfs.o: In function `get_rights_by_name':
  /root/chironfs-1.1.1/src/chironfs.c:452: undefined reference to `fuse_get_context'
  </code></pre>
  
  <p>the pthread error tells me that -lpthread is missing, but the fuse error is kinda weird cause -lfuse is being used</p>
  
  <p>i found a solution <a href="http://xinglin-system.blogspot.co.at/2012/03/undefined-reference-to-fusegetcontext.html" rel="noreferrer">here</a> which suggests to put libraries after object files</p>
  
  <p>so i removed -lfuse and added -lfuse -lpthread at the very end of the line</p>
  
  <p>now it compiles without an error and it seems that this is the way it should be: library after object files</p>
  
  <p>my question is:
  why is the parameter order relevant for gcc/ld? i tought gcc just parses the params like every other application and may forward the necessary params to ld or such</p>
  
  <p>in general: anyone knows facts or tips for gcc parameter ordering and maybe a bit background
  information about why it is needed this way?</p>
  
  <p>thanks</p>