Newbie on Linux: error while linking -lX11 lazarus / 1-Linux ---------------------------------------------------------------------- Leledumbo · 2008-03-17 07:59 I've just had a Linux (Freespire) machine. Now I need to know how to run Lazarus on it. I've tried compiling with LCL_PLATFORM set to either gtk1 or gtk2. On gtk1, it fails on -lglib (OK, maybe I installed it in the wrong place). Changing it to gtk2 gives me surprises: error while linking -lX11. The linker can't find X11! How can it be?! Anyone know solution to this? ---------------------------------------------------------------------- Marc · 2008-03-17 10:22 This is a FAQ: since you're doing development, you need to install the devel versions of the gtk and x11 packages. ---------------------------------------------------------------------- sp3iq · 2009-07-10 16:17 Hello, I have this same problem: .. Linking ../lazarus /usr/bin/ld: cannot find -lX11 lazarus.pp(125,1) Error: Error while linking .. I have: ubuntu 9.04, fpc 2.2.4 and lazarus 0.9.26. If the issue is finished for you, please hint what to do? Best regards, sp3iq. ---------------------------------------------------------------------- clauslack · 2009-07-10 17:15 Look at this http://www.lazarus.freepascal.org/index.php/topic,6814.ms g31822.html#msg31822 This was a successful installation ---------------------------------------------------------------------- sp3iq · 2009-07-10 19:09 Thanks very much, but its next problem. My report: 1. sudo apt-get install X-dev libX11-dev libXi-dev libXmu-dev Couldn't find package X-dev 2. sudo apt-get install xorg-dev libX11-dev libXi-dev libXmu-dev Install OK. 3. make clean all LCL_PLATFORM=gtk2 Linker went on, but its next problem: .. Linking ../lazarus /usr/bin/ld: cannot find -lgdk_pixbuf-2.0 lazarus.pp(125,1) Error: Error while linking I looking for now gdk_pixbuf-2.0 (?). Does anyone know what to do to the linker was ok? Best regards, sp3iq. ---------------------------------------------------------------------- clauslack · 2009-07-10 20:48 Try install libgdk-pixbuf-dev and then (gtk2) libgtk2.0-dev Regards ---------------------------------------------------------------------- sp3iq · 2009-07-11 06:04 In the beginning was: Linking ../lazarus cannot find -lX11 So I installed libX11: sudo apt-get install xorg-dev libX11-dev libXi-dev libXmu-dev Currently I have a problem: the linker says something different than the system 1. Linker: Linking ../lazarus /usr/bin/ld: cannot find -lgdk_pixbuf-2.0 lazarus.pp(125,1) Error: Error while linking 2. Attempting installation libgdk_pixbuf: sudo apt-get install libgdk-pixbuf Could not find package libgdk-pixbuf 3.  Attempting installation libgdk_pixbuf2: sudo apt-get install libgdk-pixbuf2 Reading package lists ... Done Building dependency tree Reading state information ... Ready libgdk-pixbuf2 is already the newest version Which name of a missing library: gdk_pixbuf-2.0 is responsible ? Best regards, sp3iq. ---------------------------------------------------------------------- Marc · 2009-07-11 10:24 Like you did for X11, you need libgdk_pixbuf2-dev ---------------------------------------------------------------------- sp3iq · 2009-07-12 21:58 Hi, I installed libgtk2.0-dev: sudo apt-get install libgtk2.0-dev and problems with the linker process is ended. Now I have version 0.9.27 Lazarus (svn update .. I got #20843) Thank you all for your help. Best regards, sp3iq.