I compiled fltk 1.3 on OS X 10.7 without a problem. I ran a simple program to
create a hello world window as well. However, I am trying to create an
Fl_Gl_Window and now I am getting this error:
g++ -I/usr/local/include -I/usr/local/include/FL/images -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -o 'myprogram'
'myprogram.cpp' /usr/local/lib/libfltk.a -lpthread -framework Cocoa
Undefined symbols for architecture x86_64:
"Fl_Gl_Window::~Fl_Gl_Window()", referenced from:
MyWindow::~MyWindow()in ccUhGfnh.o
MyWindow::~MyWindow()in ccUhGfnh.o
"vtable for Fl_Gl_Window", referenced from:
Fl_Gl_Window::Fl_Gl_Window(int, int, int, int, char const*)in ccUhGfnh.o
NOTE: a missing vtable usually means the first non-inline virtual member
function has no definition.
"Fl_Gl_Window::init()", referenced from:
Fl_Gl_Window::Fl_Gl_Window(int, int, int, int, char const*)in ccUhGfnh.o
"Fl_Gl_Window::handle(int)", referenced from:
vtable for MyWindowin ccUhGfnh.o
"Fl_Gl_Window::resize(int, int, int, int)", referenced from:
vtable for MyWindowin ccUhGfnh.o
"Fl_Gl_Window::show()", referenced from:
vtable for MyWindowin ccUhGfnh.o
"Fl_Gl_Window::hide()", referenced from:
vtable for MyWindowin ccUhGfnh.o
"Fl_Gl_Window::flush()", referenced from:
vtable for MyWindowin ccUhGfnh.o
"Fl_Gl_Window::draw_overlay()", referenced from:
vtable for MyWindowin ccUhGfnh.o
"typeinfo for Fl_Gl_Window", referenced from:
typeinfo for MyWindowin ccUhGfnh.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
Here is the program I am trying to compile.
class MyWindow : public Fl_Gl_Window
{
public:
MyWindow(int x, int y, int w, int h, const char* label)
: Fl_Gl_Window(x,y,w,h,label) {}
private:
void draw()
{
}
};
int main(int argc, char** argv)
{
MyWindow* glWin = new MyWindow(100,100,500,500,"hello world!");
glWin->show();
Fl::run();
delete glWin;
return 1;
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk