Hello.
I'm getting this error. I've looked online and it says this happens when something is declared but not defined, however I don't see any issues like that. The most annoying part is that it compiles fine in cmd. I'm not sure why Visual Studio 2013 is giving
me issues
Errors
Error 1
error LNK2019: unresolved external symbol "public: __thiscall Shader::Shader(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0Shader@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
Error 2
error LNK2019: unresolved external symbol "public: virtual __thiscall Shader::~Shader(void)" (??1Shader@@UAE@XZ) referenced in function _main
Error 3
error LNK1120: 2 unresolved externals
main.cpp
#include <iostream>
#include "shader.h"
int main(int argc, char** argv)
{
Shader shader("./res/basicShader");
return 0;
}
shader.h
#ifndef SHADER_H
#define SHADER_H
#include <string>
class Shader
{
public:
Shader(const std::string& fileName);
virtual ~Shader();
protected:
private:
};
#endif //SHADER_H
shader.cpp
#include "shader.h"
#include <iostream>
#include <fstream>
#include <string>
Shader::Shader(const std::string& fileName)
{
}
Shader::~Shader()
{
}