0

私は以下のようなコードを持っています/root_project/main.cpp

#include "theoraplayer/TheoraVideoClip.h"

unsigned int tex_id;
TheoraVideoManager* mgr;
TheoraVideoClip* clip;
std::string window_name="glut_player";
bool started=1;
int window_w=800,window_h=600;

void draw()
{
    glBindTexture(GL_TEXTURE_2D,tex_id);

    TheoraVideoFrame* f=clip->getNextFrame();   //this gives an error!!!
    if (f)
    {

TheoraVideoClip.hファイルはにあります/root_project/include/theoraplayer/

TheoraVideoClip.hにはこれがあります:

TheoraVideoFrame* getNextFrame();

そして、を使用してコンパイルしようとすると、g++ -o app main.cpp -lGL -lglut -lGLU 次のエラーが発生します。

main.cpp:(。text+0xac2): `TheoraVideoClip :: getNextFrame()'への未定義の参照

誰もがなぜ知っていますか?

Ubuntu 11.10

4

1 に答える 1

2

また、にリンクする必要がありますlibtheoraplayer

于 2012-04-06T17:32:07.843 に答える