title: Undefined reference ... But all is linked
body: <p>I have a link problem with CodeBlocks IDE. But I think everything should be fine.</p>
  
  <p>I want to work with laslib library. They provide a .lib file which I've linked in CodeBlocks IDE (such i usually did ...). Then I've included the "inc" folder which containing .hpp includes.</p>
  
  <p>Atm, I did the minimal requirement to include an external library.</p>
  
  <p>Then, in my "main" function, I've included the necessary files, the CodeBlocks intellisense provide me the prototypes of functions (so links are good I guess).</p>
  
  <p>Here is my code : </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  #include "lasreader.hpp"
  #include "laswriter.hpp"
  #include "lasdefinitions.hpp"
  
  #define FILENAME "D:\\las.las"
  #define FILEOUT "D:\\out"
  
  int main(int argc, char** argv)
  {
  // Assume that's correct for simplicity @TODO : check argv
  std::string filename = FILENAME;//argv[1];
  std::string file_out = FILEOUT; //argv[2];
  
  LASreadOpener lasreadopener;
  LASwriteOpener laswriteopener;
  lasreadopener.set_file_name(filename.c_str());
  laswriteopener.set_file_name(file_out.c_str());
  
  lasreadopener.parse(0, NULL); // parse without args
  
  // Declare lasreader
  LASreader* lasreader;
  
  // Open the file
  lasreader = lasreadopener.open();
  
  //  Create and open the writer
  LASwriter* laswriter = laswriteopener.open(&amp;lasreader-&gt;header);
  
  // Loop through the points (note they will already be filtered)
  while (lasreader-&gt;read_point())
  {
      // Show coordinates
      std::cout &lt;&lt; lasreader-&gt;point.get_x() &lt;&lt; ", " &lt;&lt; lasreader-&gt;point.get_y() &lt;&lt; ", " &lt;&lt; lasreader-&gt;point.get_z() &lt;&lt; std::endl;
  
      // Write point
      laswriter-&gt;write_point(&amp;lasreader-&gt;point);
  
      // Add it to the inventory (keeps track of min/max values for the header)
      laswriter-&gt;update_inventory(&amp;lasreader-&gt;point);
  }
  
  laswriter-&gt;update_header(&amp;lasreader-&gt;header, TRUE);
  
  laswriter-&gt;close();
  lasreader-&gt;close();
  
  delete laswriter;
  delete lasreader;
  }
  </code></pre>
  
  <p>And errors are : </p>
  
  <pre><code>main.cpp|17|undefined reference to `LASreadOpener::LASreadOpener()'|
  main.cpp|18|undefined reference to `LASwriteOpener::LASwriteOpener()'|
  </code></pre>
  
  <p>etc ...</p>
  
  <p>I didnt see what I've did wrong ... I've already tried the "hard" method with copying .hpp and .lib in mingw corresponding folders ...</p>
  
  <p>Any ideas?</p>