linking errors when including header file

I’m trying to “object orient” an opengl program of mine and whenever I include a header file with the defines need to get the multitexturing extension I get linking errors up the ying yang. The header file I’m including is straight out of the source for one of NVidia’s demos.

It uses the #ifndef
trick so I’m running out of ideas.



Does the header have complete class implementations, or function implementations. (As opposed to just definitions.)

I’m guessing the linker errors are something like “symbol Blah already defined in module BlahBlahBlah?”

If that’s the case then you need to move whatever is giving the error to a .cpp file and in the header just use a definition for that. That way you have the definition for it so that all the .cpp files can use it, but it will only be implemented in onej “module.”

If I’m wrong about the error, post the exact error and a short bit of code from the header giving the headaches.