Original Post
hi, i lately tried to organise my code into different source files, but it is annoying me beacuse i cant get it to work. For example: i have a file called object.cpp , and a header called header.h. i did some drawing code in it (with textures), and put it all in a function, void TieFighter().
When i tried to compile this it said that there was an undefine reference to a variable (called TexID) in the main.cpp file. So i tried puttin an "extern" in front of it,
eg: "extern unsigned int TexID"
but it gave me the same errors, and i cant even get a camra clas to load from it. i have done the #include "header.h in both of them, so im confused.
Is it my code, or have I included something wrong, please help.
-----
"Here lies a toppled God,
His fall was not a small one,
We but built his pedastle,
A narrow, and a tall one"
Frank Herbert (Dune:Messiah)