qt creator unreference 异常
Tofloor
poster avatar
野山菌
deepin
2016-08-30 18:29
Author
本帖最后由 chaloongjir 于 2016-8-30 10:30 编辑

在学习opengl
新建的项目,使用glfw和glew,已经在项目配置文件里添加了LIBS        += -lglfw -lGLEW-lGL但是还是报错,在main函数里调用自定义的shader类,头文件已包含
// Build and compile our shader program
        ShaderObj ourShader("shaders/vert.vert", "shaders/frag.frag");

shader类的头文件是酱紫的
class Shader
{
public:
        // 程序ID
        GLuint Program;
        // 构造器读取并创建Shader
        ShaderObj(const GLchar * vertexSourcePath, const GLchar * fragmentSourcePath);
        // 使用Program
        void Use();
};

cpp是酱紫的

class ShaderObj
{
        GLuint Program;
        // Constructor generates the shader on the fly
        Shader(const GLchar* vertexPath, const GLchar* fragmentPath)
        {
           //..........
        }
        // Uses the current shader
        void Use()
        {
            //....
        }
};

build构建的时候会报unreference to Shader::Shader(char const *, char const *)
unreference to Shader::use( )
这个怎么弄,在deepin里做的,不知道还缺了什么或许对熟悉的人来说这个问题很弱智,勿喷

Reply Favorite View the author
All Replies

No replies yet