Re: [fltk.general] Re: I just installed FLTK on Linux but I have a compile error

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
Previous Message ]New Message | Reply ]Next Message ]

Re: Re: I just installed FLTK on Linux but I have a compile error ken williams 06:58 Oct 22 top right image
  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/ 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?
hello.cpp is the one from the FLTK 1.4.0 documentation:

Thank you!

On Wednesday, October 21, 2020 at 5:16:54 PM UTC+2 ken williams wrote:
He is using Visual Studio but he doesn't have an express recommendation, as far as I know.
I started with VS on Windows.. but I switched VS Code and now to Linux to force myself to understand more of what's behind the scenes...

On Wednesday, October 21, 2020 at 5:09:36 PM UTC+2 Ian MacArthur wrote:
On 21 Oct 2020, at 15:28, ken williams wrote:
> Thanks Greg.. it works with fltk-config
> Thanks, I was so focused on installing it that I forgot about the documentation
> Going back to reading it...

As an aside - what does Dr.S recommend to do for compiling stuff in his book?

You said you were following the book, so I wonder what mechanism it recommends...

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
To view this discussion on the web visit
Direct Link to Message ]
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]

Comments are owned by the poster. All other content is copyright 1998-2020 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.