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

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
Munair
Posts: 163
Joined: Oct 19, 2017 15:00
Location: 't Zand, The Netherlands
Contact:

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

Postby Munair » Nov 13, 2017 23:44

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: 7169
Joined: May 28, 2005 3:28
Location: Germany

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

Postby D.J.Peters » Nov 13, 2017 23:48

try this: #inclib "gtksourceview-3.0"
Munair
Posts: 163
Joined: Oct 19, 2017 15:00
Location: 't Zand, The Netherlands
Contact:

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

Postby Munair » Nov 13, 2017 23:58

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: 2024
Joined: Jun 02, 2013 9:27
Location: Switzerland

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

Postby MrSwiss » Nov 14, 2017 1:24

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: 1127
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

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

Postby St_W » Nov 14, 2017 12:58

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: 163
Joined: Oct 19, 2017 15:00
Location: 't Zand, The Netherlands
Contact:

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

Postby Munair » Nov 14, 2017 15:13

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.

Return to “Libraries”

Who is online

Users browsing this forum: No registered users and 1 guest