Question

I have a code like this below in /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)
    {

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 I'm gettin this error:

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

Anyone knows Why?

Ubuntu 11.10

Was it helpful?

Solution

You also need to link to libtheoraplayer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top