C++ compilation problem -
How to forget too much C ++ code Anyway, here's the problem.
I am trying to load the class defined in a CPP file.
In the main function:
... ... #include "loader.h" ... ... model load_model ("TechnologyEnterpriseFacility_Day_Gregor / TechnologyEnterpriseFacility_Gregor.model" );
The header file looks like this:
#ifndef LOADER_H_ #define LOADER_H_ class model {public: int texture []; Float corner [] [3]; Float triangle [] [13]; Model (const char *); // constructor}; #endif / * LOADER_H_ * /
and here CPP file is:
#include & lt; Iostream & gt; # Include & lt; Fstream & gt; #include & lt; String & gt; # Include & lt; Sstream & gt; #include & lt; Typeinfo & gt; # Include "loader.h" using the namespace std; Model :: model (const char * filename) {... ...
When I compile the main function, I found the error message:
Gcc -o glrender glrender.cpp -lglut /tmp/cc3sWIgb.o: `__static_initialization_and_destruction_0 (int, int) 'in the function: glrender.cpp :(. Text + 0x11b):` Undefined' in the context of model :: model References (four const *) 'Gather 2: The exit status of LD1 is returned
Comments and ideas have been welcomed, thanks.
Did you forget to include the model.cpp
in your compile line? Are you
GCC-O glender glender CPP model. Cpp - Lglut
Comments
Post a Comment