Geany Compler Errors

New to FreeBASIC? Post your questions here.
Mike Green9
Posts: 5
Joined: Jan 05, 2021 20:43

Geany Compler Errors

Postby Mike Green9 » Jan 11, 2021 20:51

Ubuntu 20.04, FreeBasic V1.07, Geany 1.36

Hi.

Whenever Geany Compiles a program with either of these statements:

WindowTitle’ or ‘Screen’ or ‘#include “fbgfx.bi”’

the compiler says:
ld: cannot find -lXpm
ld: cannot find -lXander
ld: cannot find -lXrendend

What am I missing?

Thanks,
M….
dodicat
Posts: 6754
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Geany Compler Errors

Postby dodicat » Jan 11, 2021 21:43

I think you'll need to get them from your repository.
Here are the first few lines of fbgfx.bi

Code: Select all

#ifndef __fbgfx_bi__
#define __fbgfx_bi__

#inclib "fbgfx"
#ifdef __FB_WIN32__
   #inclib "gdi32"
   #inclib "winmm"
   #inclib "user32"
#elseif defined(__FB_LINUX__)
   #libpath "/usr/X11R6/lib"
   #inclib "X11"
   #inclib "Xext"
   #inclib "Xpm"
   #inclib "Xrandr"
   #inclib "Xrender"
   #inclib "pthread"
#endif
 

Every Linux distro I have used, I had to do this, but I use Windows these days.
There are some regular Linux users here, perhaps they will elaborate.
badidea
Posts: 2175
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Geany Compler Errors

Postby badidea » Jan 11, 2021 21:58

It is not Geany that does the compilation. That is done by the freebasic compiler (fbc), called by Geany.
The needed libraries are listed in the first topic in the linux section on this forum (viewforum.php?f=5), in the readme.txt shipped with freebasic (https://github.com/freebasic/fbc/blob/master/readme.txt) and on the wiki (https://freebasic.net/wiki/CompilerInstalling).
Mike Green9
Posts: 5
Joined: Jan 05, 2021 20:43

Re: Geany Compler Errors

Postby Mike Green9 » Jan 12, 2021 21:20

Hi and thanks.

This did it:

sudo apt install libx11-dev libxext-dev libxpm-dev libxrender-dev libxrandr-dev

You guys are GREAT!!

M...

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 12 guests