lglib problem lazarus / 1-Linux ---------------------------------------------------------------------- OPOJ · 2005-05-01 15:34 Hi all. I've just installed Lazarus 0.9.6 for Linux but when trying to compile I'm getting the message: /usr/bin/ld: cannot find -lglib project1.lpr(14,1) Error: Error while linking It happens to any program I try to run. This one for example is only a form and a button. I'm running Mandrake 10.1 with kernel 2.6.8. Tried to get lglib but couldn't find anywhere. Any suggestions? Thanks in advance. ---------------------------------------------------------------------- Anonymous · 2005-05-01 16:06 Perhaps try to run ldconfig as the root user. If you've just installed Lazarus and the FPC without a reboot then the linker may need updating. ---------------------------------------------------------------------- eric · 2005-05-02 15:54 Two things: 1. Have you got the necessary development packages installed, i.e. glib-devel or glib-dev, or whatever your distro calls it? 2. You probably need to edit /etc/fpc.cfg. Find the section labelled "# searchpath for libraries" and add (or uncomment) the path to your Gnome libraries. For example, on my SuSE system I added the line -Fl/opt/gnome/lib Eric ---------------------------------------------------------------------- OPOJ · 2005-05-03 22:23 rebooting didn't work ldconfig didn't work editing /etc/fpc.cfg didn't work I have both glib-devel and glibc-devel installed and none of them provide a library called lglib. Actually, in my entire filesystem there's no file named or partially named lglib thanks again ---------------------------------------------------------------------- OPOJ · 2005-05-03 23:52 I'm compiling now. The problem was links. When Lazarus says that couldn't find lglib it was looking for libglib.so. The same happened to lX11 (or libX11.so) and others. So, I linked: ln -s /usr/lib/libglib-2.0.so /usr/lib/libglib.so ln -s /usr/X11R6/lib/libX11.so.6 /usr/lib/libX11.so ln -s /usr/X11R6/lib/libXi.so.6 /usr/lib/libXi.so ln -s /usr/X11R6/lib/libXext.so.6 /usr/lib/libXext.so It's not fully solved yet because the program doesn't run. The error: (project1:9918): GLib-CRITICAL **: g_log_remove_handler: assertion `handler_id > 0' failed [FORMS.PP] ExceptionOccurred   Sender=EAccessViolation   Exception=Access violation   Stack trace: TApplication.HandleException Access violation [FORMS.PP] ExceptionOccurred ---------------------------------------------------------------------- Drewski · 2005-05-04 18:30 it looks like you've created a link to glib2, but unless you are compiling lazarus for gtk2 you should have created a link to glib1 instead. HTH Andrew ---------------------------------------------------------------------- Anonymous · 2005-05-04 22:13 thanks very much andyman, that worked. thank you all. ---------------------------------------------------------------------- OPOJ · 2005-05-04 22:15 thanks very much andyman, that worked. thank you all. ---------------------------------------------------------------------- Marc · 2005-05-06 12:18 2 remarks: * the links you have created are normally made by a -devel package * the message lglib not found is somewhat confusing. The meaning is that the linker couldn't find the option -l glib, so it means that it couldn't find libglib.so