title: Why doesn't g++ link with the dynamic library I create?
body: <p>I've been trying to make some applications which all rely on the same library, and dynamic libraries were my first thought: So I began writing the "Library":</p>
  
  <pre><code>/* ThinFS.h */
  
  class FileSystem {
  public:
      static void create_container(string file_name); //Creates a new container 
  };
  
  /* ThinFS.cpp */
  #include "ThinFS.h"
  void FileSystem::create_container(string file_name) {
       cout&lt;&lt;"Seems like I am going to create a new file called "&lt;&lt;file_name.c_str()&lt;&lt;endl;
  }
  </code></pre>
  
  <p>I then compile the "Library"</p>
  
  <pre><code>g++ -shared -fPIC FileSystem.cpp -o ThinFS.o
  </code></pre>
  
  <p>I then quickly wrote a file that uses the Library:</p>
  
  <pre><code>#include "ThinFS.h"
  int main() {
      FileSystem::create_container("foo");
      return (42);
  }
  </code></pre>
  
  <p>I then tried to compile that with</p>
  
  <pre><code>g++ main.cpp -L. -lThinFS
  </code></pre>
  
  <p>But it won't compile with the following error:</p>
  
  <pre><code>/usr/bin/ld: cannot find -lThinFS
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>I think I'm missing something very obvious, please help me :)</p>