Cannot find libgtksourceview-3.0.so (but is installed)

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
Post Reply
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Cannot find libgtksourceview-3.0.so (but is installed)

Post by Munair »

Sometimes this drives me crazy. "cannot find library" or "undefined reference". I know, the library must be installed. On Linux, usually under /usr/lib.

This time, I installed the development files for GtkSourceView 3.0. I checked and they are installed in /usr/lib/x86_64-linux-gnu. So FB should be able to find them. But NO! I even copied the files to /usr/lib. No effect.

When I add #inclib "libgtksourceview-3.0.so" to the program, I get an error library not found. When I comment out the line, I get errors:
fbc -w all "test1.bas"
test1.o: In function `MAIN':
test1.c:(.text+0x12c): undefined reference to `gtk_source_language_manager_get_default'
test1.c:(.text+0x14b): undefined reference to `gtk_source_language_manager_get_language'
Compilation failed.

Does anyone have any idea what the problem is?
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: Cannot find libgtksourceview-3.0.so (but is installed)

Post by D.J.Peters »

try this: #inclib "gtksourceview-3.0"
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Cannot find libgtksourceview-3.0.so (but is installed)

Post by Munair »

D.J.Peters wrote:try this: #inclib "gtksourceview-3.0"
THAT WORKS! Why can FB not find the lib by default? Is there a way to configure this? Thanks anyway.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Cannot find libgtksourceview-3.0.so (but is installed)

Post by MrSwiss »

Munair wrote:THAT WORKS! Why can FB not find the lib by default?
That's done for compatibility, with different OS's.
The leading "lib" and the extension .so/.dll/.a -- are always clipped off,
when stating the library name, to be loaded. E.g. libmylib.dll is loaded:
#inclib "mylib"
Munair wrote:Is there a way to configure this?
Not as far as I know (default behaviour). Read FB-Manual.
St_W
Posts: 1618
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Cannot find libgtksourceview-3.0.so (but is installed)

Post by St_W »

Munair wrote:Why can FB not find the lib by default? Is there a way to configure this?
The file extension is not part of the library name and automatically appended. Multiple file extensions may be tried, see https://www.freebasic.net/wiki/wikka.ph ... mpilerOptl for details.
Munair
Posts: 1286
Joined: Oct 19, 2017 15:00
Location: Netherlands
Contact:

Re: Cannot find libgtksourceview-3.0.so (but is installed)

Post by Munair »

St_W wrote:
Munair wrote:Why can FB not find the lib by default? Is there a way to configure this?
The file extension is not part of the library name and automatically appended. Multiple file extensions may be tried, see https://www.freebasic.net/wiki/wikka.ph ... mpilerOptl for details.
Thanks for the link.
Post Reply