Just trying to call a function of a library

Hi,

I have a code like this below in /root_project/main.cpp:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#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)
    {

and the TheoraVideoClip.h file is in /root_project/include/theoraplayer/.

Inside of TheoraVideoClip.h there is this:

TheoraVideoFrame* getNextFrame();

And when I try to compile using g++ -o app main.cpp -lGL -lglut -lGLU -ltheora -ltheoradec -ltheoraenc I'm gettin this error:

main.cpp:(.text+0xac2): undefined reference to `TheoraVideoClip::getNextFrame()'


Anyone knows Why?

Ubuntu 11.10
Topic archived. No new replies allowed.