/usr/bin/ld: /usr/local/lib/libfltk.a(Fl_X11_Window_Driver.cxx.o):
undefined reference to symbol 'dlsym@@GLIBC_2.2.5'
/usr/bin/ld: /usr/lib/libdl.so.2: error adding symbols: DSO missing
from command line
collect2: error: ld returned 1 exit status
Could someone tell me what I should add or change?
That particular error is (AFAICT) because you missed to include '-ldl'
in your command.
A more general approach would be to use either
$ fltk-config --compile hello.cxx
and learn from the output which options you need or to use fltk-config
to provide the necessary options for you, like this:
$ fltk-config --cxxflags
$ fltk-config --ld[static]flags
See docs and/or
$ fltk-config --help
for more info.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.