C++ compilation problem
<p>Pretty much forgot how to code C++ at all. Anyway, here is the problem.</p>

<p>I am trying to load a class defined in a .cpp file I wrote myself. </p>

<p>In the main function:</p>

<pre><code>... ...
 #include "loader.h"
... ...
 model load_model("TechnologyEnterpriseFacility_Day_Gregor/
               TechnologyEnterpriseFacility_Gregor.model");
</code></pre>

<p>the header file looks like this:</p>

<pre><code> #ifndef LOADER_H_
 #define LOADER_H_

 class model
 {
   public:
    int textures [];
    float vertices[][3];
    float triangles[][13]; 
    model(const char*); // constructor
 };

 #endif /* LOADER_H_ */
</code></pre>

<p>and here is the .cpp file:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;string&gt;
#include &lt;sstream&gt;
#include &lt;typeinfo&gt;
#include "loader.h"

using namespace std;

model::model(const char* filename)
{
    ... ...
</code></pre>

<p>When I compile the main function, I got error message:</p>

<pre><code>gcc -o glrender glrender.cpp -lglut
/tmp/cc3sWIgb.o: In function `__static_initialization_and_destruction_0(int, int)':
glrender.cpp:(.text+0x11b): undefined reference to `model::model(char const*)'
collect2: ld returned 1 exit status
</code></pre>

<p>comments and ideas are welcomed, thanks.</p>
