|
|
On 10/22/20 3:58 PM ken williams wrote:
It seems I can't compile it with g++ ...
I tried this:
g++ hello.cpp -o hello -I/usr/local/include -L/usr/local/lib -lfltk
-lXext -lX11 -lm
and I get this:
/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.
Thank you!
Welcome.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/300af06c-bf07-c441-7831-e03836b642fb%40online.de.
[ Direct Link to Message ] | |
|
| |