Ubuntu: Free Basic compiler installed on Ubuntu 14.04 can't find x11 libraries



Question:

When compiling a Free Basic program that uses graphics related statements, such as Screen or Pset, the compiler cannot find the x11 libraries. The following errors are presented. The program plot.bas simply has a sceen statment to change the mode to a graphics mode. Does not matter which mode is requested.

ken@ken-desktop:~/freebasic$ fbc plot.bas  ld: cannot find -lX11  ld: cannot find -lXext  ld: cannot find -lXpm  ld: cannot find -lXrandr  ld: cannot find -lXrender  

I've looked at the Free Basic forums and all recommend making sure that the libx11-dev package is properly installed. This has been done using the Ubuntu Software Center. I still have the same problem. Does anyone have any insight into this?


Solution:1

You might need other x11 dev packages too. libxext-dev, libxpm-dev, libxrandr-dev, libxrender, but maybe not if your compiles were OK.

Now the complaint of not finding -lX11 is odd since that should be in in the libx11-dev, but maybe the .so is just a link to the actual library in package libx11-6. In that case, all the other dev packages will need the matching library package too: libxext6, libxpm4, libxrandr2, libxrender1

Use apt-file search libxrandr.so etc. to find the packages needed.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »