Page 2 of 2
Posted: Tue Jul 24, 2007 3:51 pm
by DarkDragon
bembulak wrote:Sounds silly, but try to set FULL (absolute) path to the lib, like: "/usr/lib/libastro.so".
I had same problem with a lib a few days ago. And not every.
I know, it's dirty but it might work. I've already got some problems with the LD_PATH variable unter PB-Linux, but don't know why.
Here it doesn't even work with the full path. Just try yourself: compile a lib with
pbcompiler yourfile.pb -so test.dll
@Cpl.Bator:
I will try it out, but I'm wondering why it works with other libs and not with the lib coded in PureBasic.
Posted: Tue Jul 24, 2007 6:11 pm
by Anonymous
but I'm wondering why it works with other libs and not with the lib coded in PureBasic.
Do you have a code for test here ?
Posted: Tue Jul 24, 2007 9:35 pm
by flaith
i also tried to understand why sometimes it works and sometimes it doesn't.
Two examples (4.10B1) :
file DLL.pb
Code: Select all
ProcedureDLL.l addition(a.l, b.l)
ProcedureReturn a + b
EndProcedure
file testDLL.pb
Code: Select all
If OpenLibrary(0, "./DLL.so")
result = CallFunction(0, "addition",5,3)
Debug result
CloseLibrary(0)
Else
MessageRequester("ERROR","Cannot open DLL.so")
End
EndIf
it works, after that i added a second procedure :
Code: Select all
ProcedureDLL.l addition(a.l, b.l)
ProcedureReturn a + b
EndProcedure
ProcedureDLL.l error(texte.s)
ProcedureReturn MessageRequester("Error",texte)
EndProcedure
this time it doesn't work because of the messagerequester

Cpl. Bator fixes my problem
Posted: Sat Oct 20, 2007 2:52 pm
by John Duchek
using "./astrolib.so" works. I just don't get now why I didn't need that for libxine.so that is in the same directory, unless it isn't loading that copy....
Thanks,
John
Posted: Wed Oct 31, 2007 1:02 pm
by Thalius
check which libs are locted in
/usr/lib
/usr/local/lib
usually without a path libs are preferred opened from there - so copying the .so s there or adding your applications /lib path to the LD_LIBRARY_PATH assign.
Thalius