Hi,

  I try to compile a fltk2 program with a GlWindow element, with Code::Blocks, 
under Ubuntu. This program compiled correctly under my last system (Debian) and 
under Windows with Dev-cpp. But after installing fltk-2.0.x-r6525 and OpenGl 
libraries, I have still a linking problem. It's look like the compiler doesn't 
find the fltk2_gl library whereas it's linked. I put below the part of the code 
with errors and the compilation results.

  mainWindow.glWindow->mode(DOUBLE_BUFFER | DEPTH_BUFFER | STENCIL_BUFFER | 
RGB24_COLOR | ACCUM_BUFFER);
  mainWindow.glWindow->listeRobots=listeRobots;
  mainWindow.glWindow->listeObstacles=listeObstacles;
  mainWindow.glWindow->listeObstacles=listeObstacles;
  mainWindow.glWindow->nbCases=nbCases;
  mainWindow.glWindow->longueurCases=dimCases;
  mainWindow.glWindow->additionalDisplay=&affichageSupplementaire;
  mainWindow.glWindow->action=&action;
  mainWindow.doubleWindow->show();

  glwindow is an instance of a MyGlWindow class is derived from fltk::GlWindow 
class.

  And the result of the compilation is :

        obj/Debug/main.o||In function `main':|
        main.cpp|792|undefined reference to `fltk::GlWindow::mode(int)'|
        obj/Debug/mainWindow.o||In function `fltk::GlWindow::GlWindow(int, int, 
int, int, char const*)':|
        )]+0x43)||undefined reference to `vtable for fltk::GlWindow'|
        )]+0x4e)||undefined reference to `fltk::GlWindow::init()'|
        obj/Debug/mainWindow.o||In function `MyGlWindow::MyGlWindow(int, int, 
int, int)':|
         int)]+0x115)||undefined reference to `fltk::GlWindow::~GlWindow()'|
        obj/Debug/myGlWindow.o||In function `MyGlWindow::handle(int)':|
        myGlWindow.cpp|638|undefined reference to `fltk::GlWindow::handle(int)'|
        obj/Debug/myGlWindow.o||In function `~MyGlWindow':|
        myGlWindow.h|28|undefined reference to `fltk::GlWindow::~GlWindow()'|
        myGlWindow.h|28|undefined reference to `fltk::GlWindow::~GlWindow()'|
        myGlWindow.h|28|undefined reference to `fltk::GlWindow::~GlWindow()'|
        myGlWindow.h|28|undefined reference to `fltk::GlWindow::~GlWindow()'|
        obj/Debug/myGlWindow.o:(.rodata._ZTV10MyGlWindow[vtable for 
MyGlWindow]+0x18)||undefined reference to `fltk::GlWindow::layout()'|
        obj/Debug/myGlWindow.o:(.rodata._ZTV10MyGlWindow[vtable for 
MyGlWindow]+0x1c)||undefined reference to `fltk::GlWindow::draw_overlay()'|
        obj/Debug/myGlWindow.o:(.rodata._ZTV10MyGlWindow[vtable for 
MyGlWindow]+0x20)||undefined reference to `fltk::GlWindow::destroy()'|
        obj/Debug/myGlWindow.o:(.rodata._ZTV10MyGlWindow[vtable for 
MyGlWindow]+0x24)||undefined reference to `fltk::GlWindow::flush()'|
        obj/Debug/myGlWindow.o:(.rodata._ZTV10MyGlWindow[vtable for 
MyGlWindow]+0x28)||undefined reference to `fltk::GlWindow::create()'|
        obj/Debug/myGlWindow.o:(.rodata._ZTI10MyGlWindow[typeinfo for 
MyGlWindow]+0x8)||undefined reference to `typeinfo for fltk::GlWindow'|

  If you have an idea about the problem...


  Thanks in advance for your answers and please sorry for my really not fluent 
english...

Vincent
_______________________________________________
fltk-opengl mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-opengl

Reply via email to