Recent

Author Topic: Problem linking (used to work)  (Read 2944 times)

Michael Collier

  • Sr. Member
  • ****
  • Posts: 301
Problem linking (used to work)
« on: November 17, 2017, 12:55:47 pm »
I think my linux system must have changed without me knowing because when I try to link a simple Project1 application I get linking errors as follows:
Code: Pascal  [Select][+][-]
  1. /usr/bin/ld: cannot find -lgdk-x11-2.0
  2. /usr/bin/ld: cannot find -lgdk_pixbuf-2.0
  3. /usr/bin/ld: cannot find -lgtk-x11-2.0
  4. /usr/bin/ld: cannot find -lgobject-2.0
  5. /usr/bin/ld: cannot find -lglib-2.0
  6. /usr/bin/ld: cannot find -lgthread-2.0
  7. /usr/bin/ld: cannot find -lgmodule-2.0
  8. /usr/bin/ld: cannot find -lpango-1.0
  9. /usr/bin/ld: cannot find -lcairo
  10. /usr/bin/ld: cannot find -latk-1.0
  11.  

I don't use this particular machine very often (probably 3 months ago since last usage).

Can anyone tell by the messages what might have happened since then?

Is the solution to uninstall Lazarus and do a re-install?

I'm using FPC 3.1, I just noticed too that the menu has disappeared from  my lazarus IDE, is there a way to get it to come back, I tried max/restore window, right clicking/alt-key etc. It is the new docked layout that I am less familiar with.

Thanks

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Problem linking (used to work)
« Reply #1 on: November 17, 2017, 12:58:27 pm »
Maybe target set wrong? Compiling for 32-bit while otherwise you are compiling for 64-bit ?

Michael Collier

  • Sr. Member
  • ****
  • Posts: 301
Re: Problem linking (used to work)
« Reply #2 on: November 17, 2017, 01:15:32 pm »
Thanks, I tried changing target options from

OS:default
CPU:default
Processor:default

To
OS:Linux
CPU:i386 (my machine is 32 bit pentium 4)
Processor: Pentium IV

I even tried switching widget set to gtk3 just in case, still no luck though..

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Problem linking (used to work)
« Reply #3 on: November 17, 2017, 02:41:17 pm »
Is the solution to uninstall Lazarus and do a re-install?

No, uninstall/reinstalling won't help. You even unable to reinstall. That issue is dependency issue, all you need to do is install all the missing libraries it told you.

I checked Lazarus 1.8 gtk (using Synaptic Package Manager), it requires:
- libatk1.0-0
- libc6
- libcairo2
- libgdk-pixbuf2.0-0
- libglib2.0-0
- libgtk2.0-0
- libpango-1.0-0
- libpangocairo-1.0-0
- libx11-6

Missing library is a common issue on Linux. The solution is easy: install all the missing libraries.

 

TinyPortal © 2005-2018