error LNK2001: unresolved external symbol "public: __thiscall cwc::glShaderManager::glShaderManager(void)" 0glShaderManager@cwc@@QAE@XZ"]??0glShaderManager@cwc@@QAE@XZ)
error LNK2001: unresolved external symbol "public: virtual __thiscall cwc::glShaderManager::~glShaderManager(void)" 1glShaderManager@cwc@@UAE@XZ"]1glShaderManager@cwc@@UAE@XZ)
I included all the necessary includes exactly the same as the project on the website has it. I don’t know why im getting linker errors when i never added any shader linkers, and this is because the project on the website didnt have any shader linkers.
I didn’t personally make the class i just took it from opengl.org.
The glShaderManager in the glsl file. Here are some excerpts from the header and source relating to the glShaderManager class
glsl.h
namespace cwc
{
class glShaderManager;
class GLSLAPI glShader
{
friend class glShaderManager;
}
class GLSLAPI glShaderManager
{
public:
glShaderManager();
virtual ~glShaderManager();
}
glsl.cpp
// ShaderManager: Easy use of (multiple) Shaders
glShaderManager::glShaderManager()
{
InitOpenGLExtensions();
_nInputPrimitiveType = GL_TRIANGLES;
_nOutputPrimitiveType = GL_TRIANGLE_STRIP;
_nVerticesOut = 3;
}
glShaderManager::~glShaderManager()
{
// free objects
vector<glShader*>::iterator i=_shaderObjectList.begin();
while (i!=_shaderObjectList.end())
{
//glShader* o = *i;
i=_shaderObjectList.erase(i);
//delete o;
}
}