当前位置: 动力学知识库 > 问答 > 编程问答 >

c++ - Undefined reference to

问题描述:

I'm doing an opengl/qt3 assignment, but I'm running into an undefined reference error:

Renderer.h:

...

#include "Mesh.h"

... Mesh mesh;

Renderer.cpp:

...

mesh.load("ball.obj");

...

Mesh.h:

...

bool load(string filename);

...

Mesh.cpp:

#include "Mesh.h"

...

bool Mesh::load(string filename) { ... }

...

but the compiler complains about the line mesh.load("ball.obj") as an undefined reference... What is going on? Thank you in advance!

网友答案:

Forgot to add the files to QT Designer. Solved!

分享给朋友:
您可能感兴趣的文章:
随机阅读: