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?
Cannot find libgtksourceview-3.0.so (but is installed)
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: Cannot find libgtksourceview-3.0.so (but is installed)
try this: #inclib "gtksourceview-3.0"
Re: Cannot find libgtksourceview-3.0.so (but is installed)
THAT WORKS! Why can FB not find the lib by default? Is there a way to configure this? Thanks anyway.D.J.Peters wrote:try this: #inclib "gtksourceview-3.0"
Re: Cannot find libgtksourceview-3.0.so (but is installed)
That's done for compatibility, with different OS's.Munair wrote:THAT WORKS! Why can FB not find the lib by default?
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"
Not as far as I know (default behaviour). Read FB-Manual.Munair wrote:Is there a way to configure this?
Re: Cannot find libgtksourceview-3.0.so (but is installed)
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 wrote:Why can FB not find the lib by default? Is there a way to configure this?
Re: Cannot find libgtksourceview-3.0.so (but is installed)
Thanks for the link.St_W wrote: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 wrote:Why can FB not find the lib by default? Is there a way to configure this?