[Gambas-user] Cannot find proprietary shared libraries.
ML
d4t4full at gmail.com
Tue Jun 5 14:02:47 CEST 2018
Guys, need help accessing proprietary shared libs from Gambas (v3.11.2)
from PPA in Ubuntu 16.04 x64.
I've been given -after signing an NDA with a company- a couple of
development .so files.
I placed these .so files in a subfolder inside my home folder.
I've put this path inside a .conf file, put this .conf file inside
/etc/ld.so.conf.d and ran ldconfig as superuser.
I verified the libs and their location are in the cache by grepping the
output from ldconfig -p: They are both there.
But alas! Gambas cannot find them. I have this sample code (sorry,
cannot give real code details 'cos of the NDA):
Lib call declaration in a module (say it is called modLib):
'The call name used is the actual call name, respecting
upper/lowercase, ie: no need for EXEC.
Public Extern SomeLib_GetVersion(versionStrPtr As Pointer) In "libName"
I also have a form with -appx- the following code:
Public Sub Form_Open()
Dim libVersion As String = String(128, " ")
Dim strPtr As Pointer = VarPtr(libVersion)
Try modLibrary.SomeLib_GetVersion(strPtr)
If (Error.Code) Then
Message.Error(Error.Text)
End If
End
When I call this from a form, I get the following error:
Cannot find dynamic library 'libName.so': libName.so: cannot open
shared object file: No such file or directory
Now, I've seen lib names with a trailing colon and (version?) number. I
don't know how or where can I get this info from, or if I need them.
How can I get Gambas able to find and use these .so files?
Regarding these trailing ":<number>" in EXTERN declarations: How do I
find these out, and how do I know whether I need them or not?
My sysinfo:
[System]
Gambas=3.11.2
OperatingSystem=Linux
Kernel=4.4.0-127-generic
Architecture=x86_64
Distribution=Ubuntu 16.04.4 LTS
Desktop=GNOME
Theme=Gtk
Language=en_US.UTF-8
Memory=11888M
[Libraries]
Cairo=libcairo.so.2.11400.6
Curl=libcurl.so.4.4.0
DBus=libdbus-1.so.3.14.6
GStreamer=libgstreamer-1.0.so.0.803.0
GTK+2=libgtk-x11-2.0.so.0.2400.30
GTK+3=libgtk-3.so.0.2000.8
OpenGL=libGL.so.1.2.0
Poppler=libpoppler.so.58.0.0
QT4=libQtCore.so.4.8.7
QT5=libQt5Core.so.5.5.1
SDL=libSDL-1.2.so.0.11.4
SQLite=libsqlite3.so.0.8.6
[Environment]
CLUTTER_IM_MODULE=xim
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-2r6tbcrYPM
DEFAULTS_PATH=/usr/share/gconf/gnome.default.path
DESKTOP_SESSION=gnome
DISPLAY=:0
GB_GUI=gb.qt4
GDMSESSION=gnome
GDM_LANG=en_US
GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/gambas3.desktop
GIO_LAUNCHED_DESKTOP_FILE_PID=4213
GJS_DEBUG_OUTPUT=stderr
GJS_DEBUG_TOPICS=JS ERROR;JS LOG
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
GNOME_KEYRING_CONTROL=
GNOME_KEYRING_PID=
GPG_AGENT_INFO=<home>/.gnupg/S.gpg-agent:0:1
GTK2_MODULES=overlay-scrollbar
GTK_IM_MODULE=ibus
GTK_MODULES=gail:atk-bridge
HOME=<home>
IM_CONFIG_PHASE=1
INSTANCE=
JOB=dbus
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_ADDRESS=es_AR.UTF-8
LC_IDENTIFICATION=es_AR.UTF-8
LC_MEASUREMENT=es_AR.UTF-8
LC_MONETARY=es_AR.UTF-8
LC_NAME=es_AR.UTF-8
LC_NUMERIC=es_AR.UTF-8
LC_PAPER=es_AR.UTF-8
LC_TELEPHONE=es_AR.UTF-8
LC_TIME=es_AR.UTF-8
LOGNAME=<user>
MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path
PATH=<home>/bin:<home>/bin/eclipse:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
PWD=<home>
QT4_IM_MODULE=xim
QT_ACCESSIBILITY=1
QT_IM_MODULE=ibus
QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
QT_QPA_PLATFORMTHEME=qgnomeplatform
SESSION=gnome
SESSIONTYPE=gnome-session
SESSION_MANAGER=local/<hostname>:@/tmp/.ICE-unix/12752,unix/<hostname>:/tmp/.ICE-unix/12752
SHELL=/bin/bash
SHLVL=0
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
TZ=:/etc/localtime
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/12452
USER=<user>
XAUTHORITY=<home>/.Xauthority
XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/usr/share/upstart/xdg:/etc/xdg
XDG_CURRENT_DESKTOP=GNOME
XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/<user>
XDG_MENU_PREFIX=gnome-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_DESKTOP=gnome
XDG_SESSION_ID=c2
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=7
XMODIFIERS=@im=ibus
Thanks in advance,
zxMarce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20180605/ee612361/attachment.html>
More information about the User
mailing list