Recent

Author Topic: Linking GTK3  (Read 2432 times)

dbannon

  • Hero Member
  • *****
  • Posts: 2794
    • tomboy-ng, a rewrite of the classic Tomboy
Linking GTK3
« on: October 11, 2019, 10:22:13 am »
Thought I'd have a poke at GTK3 but the basic "hello world" does not link. I see
Code: Pascal  [Select][+][-]
  1. /usr/bin/ld.bfd: cannot find -lgtk-3
  2. /usr/bin/ld.bfd: cannot find -lgdk-3

I do have
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0 -> libgdk-3.so.0.2200.30
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0 -> libgtk-3.so.0.2200.30
project1.lpr(21,1) Error: Error while linking

And my (Ububtu) /etc/ld.so.conf.d/x86_64-linux-gnu.conf has a line saying  /usr/lib/x86_64-linux-gnu so they are on my library path. 

Does ld only use *.a files in this application ?

All I have done to switch to gtk3 is set the widgetset in ProjectOptions->AdditionsAndOverrides->LCLWidgetType, is there another setting I need set ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Linking GTK3
« Reply #1 on: October 11, 2019, 10:39:15 am »
install libgtk3-dev package

dbannon

  • Hero Member
  • *****
  • Posts: 2794
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Linking GTK3
« Reply #2 on: October 11, 2019, 10:48:54 am »
Yep, that fixed it.

Thanks !

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018