FLTK logo

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

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   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 Oct 22, 2020  
  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?
hello.cpp is the one from the FLTK 1.4.0 documentation: https://fltk.gitlab.io/fltk/basics.html

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 wea...@gmail.com, 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 fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/02dbc213-b610-486b-8986-f5b737ff2ba3n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

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