Duncan Gibson wrote: >>> g++ hello.cxx [...] -lfltk_images -lfltk >>> >>> produces: >>> >>> /tmp/ccBlyRgP.o: In function `main': >>> hello.cxx:(.text+0x44): undefined reference to >>> `fltk::Window::Window(int, ... > > >> I've got the same problem. I tried fltk 1.3 and fltk 2. If the >> library name isn't right, I get an error message. If I damage the >> library (replace it with some idiotic text), I get an error message. >> If every thing seems OK, the library seems to be ignored. Linking >> with -t lists all libraries specified before and after the fltk >> library, but not that one. > > > fltk-1.3 and fltk-2 are completely different beasts, so don't confuse > them or think that they are interchangable. For example, fltk-1.3 has > an Fl_Widget class, whereas fltk-2 has an fltk namespace with a Widget > class within it, and they have incompatible APIs and ABIs. > > To discover the compiler and linker flags that are appropriate for > your installation, use 'fltk-config' for fltk-1.x, and 'fltk2-config' > for fltk-2. > > Cheers > D, Well, thanks Duncan,
but that's quit obvious or I wouldn't have got to the link stage at all. I installed fltk 2, tried that example and got the problem above. I uninstalled it, installed 1.3 tried the 1.3 example with the same problems. Well, I used the fltk2.config and fltk.config respectivly. By the way, I did it on two different maschines, one running SuSE 10.0, the other 10.3. I get allways the same results. I tried different oders of libraries and object file, different ways to specify the library (-lfltk vs. /usr/local/lib/libfltk.a). I get allways the same result. I think there must be something with the library. I have never seen ld mention it when using the -t option. But ld complains when I missspell the library or corrupt it. Greetings, Dieter _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

