BananaPi M3: "undefined reference to `XRRFreeMonitors' and 'XRRGetMonitors' lazarus / 1-Linux ---------------------------------------------------------------------- att2 · 2016-11-16 13:01 Hello, My hardware: Bananapi m3 Quotepi@bpi-iot-ros-ai:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 16.04.1 LTS Release:        16.04 Codename:       xenial pi@bpi-iot-ros-ai:~$ uname -a Linux bpi-iot-ros-ai 3.4.39-BPI-M3-Kernel #1 SMP PREEMPT Tue May 3 13:47:01 UTC 2016 armv7l armv7l armv7l GNU/Linux I freshly installed Lazarus with Quoteapt-get install fp-compiler-3.0.0 apt-get install lazarus-1.6 Trying to compile a test program results in: QuoteCompile Project, Target: project1: Exit code 256, Errors: 1, Warnings: 2 project1.lpr(22,0) Warning: "crtbegin.o" not found, this will probably cause a linking failure project1.lpr(22,0) Warning: "crtend.o" not found, this will probably cause a linking failure /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T? //usr/lib/arm-linux-gnueabihf/libgdk-x11-2.0.so: undefined reference to `XRRFreeMonitors' //usr/lib/arm-linux-gnueabihf/libgdk-x11-2.0.so: undefined reference to `XRRGetMonitors' project1.lpr(22,0) Error: Error while linking Yes, about the "crtbegin.o" I know I have to edit the GCC library path in /etc/fpc.cfg  - I will do that (later). What really gets me clueless is the //usr/lib/arm-linux-gnueabihf/libgdk-x11-2.0.so: undefined reference to `XRRFreeMonitors' //usr/lib/arm-linux-gnueabihf/libgdk-x11-2.0.so: undefined reference to `XRRGetMonitors' I did not fail to miss these double slashes "//" at the beginning. Some config file or other must be wrong. Can you help me to fix that, please? ---------------------------------------------------------------------- marcov · 2016-11-16 13:04 Try linking lib "Xrandr". Probably the distribution's libraries have some problem in their dependencies. ---------------------------------------------------------------------- att2 · 2016-11-16 13:33 which lib XRandr... link to where? Do I have to edit /etc/fpc.cfg or what do you mean exactly ? ---------------------------------------------------------------------- Leledumbo · 2016-11-16 18:16 Quote from: att2 on November 16, 2016, 02:01:20 pmMy hardware: Bananapi m3 Better mention your OS, Banana Pi has more than 1 OS available. ---------------------------------------------------------------------- att2 · 2016-11-17 08:13 Quote from: Leledumbo on November 16, 2016, 07:16:53 pmQuote from: att2 on November 16, 2016, 02:01:20 pmMy hardware: Bananapi m3 Better mention your OS, Banana Pi has more than 1 OS available. I thought that the "lsb_release" command was obvious? -> Ubuntu Mate 16.04.1 LTS "Xenial", based on the image from : http://www.banana-pi.org/m3-download.html   ->  "Ubuntu 16.04 Mate desktop" (first in list on that page) ---------------------------------------------------------------------- marcov · 2016-11-17 09:18 Quote from: att2 on November 16, 2016, 02:33:21 pmwhich lib XRandr... link to where? Do I have to edit /etc/fpc.cfg or what do you mean exactly ? You need to tell the linker which libraries to link using $linklib in header units or using -k-l. In theory, a library thus linked would automatically pull in all dependencies, but this does not always happen in practice. The xrandr was just from googling the symbolnames to do an educated guess (and not more than that), to try to put you on the path.