title: gcc newly installed libraries (libexpat1-dev) not recognised in current terminal (debian)
body: <p>I've spent quite a bit of time trying to get an expat based sample program to compile.</p>
  
  <p>I was receiving the following error message when I tried to compile </p>
  
  <pre><code>gcc -Wall -lexpat line.c -o blah 
  line.c: In function ‘main’:
  line.c:99:8: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘XML_Size’ [-Wformat]
  /tmp/ccUa3vfD.o: In function `printcurrent':
  line.c:(.text+0x42): undefined reference to `XML_SetDefaultHandler'
  line.c:(.text+0x4d): undefined reference to `XML_DefaultCurrent'
  line.c:(.text+0x60): undefined reference to `XML_SetDefaultHandler'
  /tmp/ccUa3vfD.o: In function `main':
  line.c:(.text+0x162): undefined reference to `XML_ParserCreate'
  line.c:(.text+0x1ad): undefined reference to `XML_UseParserAsHandlerArg'
  line.c:(.text+0x1c9): undefined reference to `XML_SetElementHandler'
  line.c:(.text+0x1dd): undefined reference to `XML_SetCharacterDataHandler'
  line.c:(.text+0x1f1): undefined reference to `XML_SetProcessingInstructionHandler'
  line.c:(.text+0x2b2): undefined reference to `XML_Parse'
  line.c:(.text+0x2c2): undefined reference to `XML_GetErrorCode'
  line.c:(.text+0x2ca): undefined reference to `XML_ErrorString'
  line.c:(.text+0x2d8): undefined reference to `XML_GetCurrentLineNumber'
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>I had already run the following commands:
      sudo apt-get install expat libexpat1 libexpat1-dev libxmltok1-dev</p>
  
  <p>So I messed around for ages, trying to get the error message to go away so I could compile this (simple) little program, but to no avail. </p>
  
  <p>Eventually, out of sheer randomness, I decided to switch to a Virtual Terminal. </p>
  
  <p>I ran exactly the same command, this time it worked without a problem.</p>
  
  <p>Can anyone tell me why this is? Is there something I need to run in order to refresh the library paths? </p>