[Lazarus] GTK3 widgets on macOS?

Sven Barth pascaldragon at googlemail.com
Tue Nov 26 00:03:53 CET 2019


Ryan Joseph via lazarus <lazarus at lists.lazarus-ide.org> schrieb am Mo., 25.
Nov. 2019, 20:19:

>
>
> > On Nov 25, 2019, at 2:07 PM, Sven Barth via lazarus <
> lazarus at lists.lazarus-ide.org> wrote:
> >
> > You'll likely expect wrong considering that GTK is rather Unix centric
> and doesn't like to deal with the platformisms of other platforms (both
> Windows and macOS).
> > You'll likely have to look for a libgtk.3.dylib or so and you'll need to
> adjust the import library names in the GTK3 units.
> >
>
> I see in LazGdk3.pas there is a $LINKLIB line which is wrong. On my system
> at /usr/local/Cellar/gtk+3/3.24.5/lib there is a libgtk-3.dylib which I can
> link to. I changde these to this:
>
> {$LINKLIB libgtk-3.dylib}
> {$LINKLIB libgdk-3.dylib}
>
> I then added -Fl/usr/local/Cellar/gtk+3/3.24.5/lib to the command line but
> I still get a linker error "Error: ld: library not found for -lgtk-3"
>
> For proof:
>
> ls /usr/local/Cellar/gtk+3/3.24.5/lib
> girepository-1.0      libgailutil-3.dylib   libgtk-3.0.dylib
> gtk-3.0               libgdk-3.0.dylib      libgtk-3.dylib
> libgailutil-3.0.dylib libgdk-3.dylib        pkgconfig
>
> Is that not correct?
>

Should be. 🤔

Would you please compile with -sh option which will generate a ppas.sh file
(I think) in the output directory (I think as well) which will contain the
command line the linker will be called with and check that? Maybe you can
then pass some verbosity switch to the linker to find out what goes
wrong...

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20191126/9d031a48/attachment-0001.html>


More information about the lazarus mailing list