Page 1 of 1

New in Linux... how to say "register" my library.s

Posted: Sat May 17, 2008 7:49 pm
by ManMartin
Hello:

I am already arrived to Purebasic version for linux.
I have created a library the same way I use to do it
in windows.

I save it as libmyftdi.so

I copied it to /usr/local/lib cause I readed some posts arround
that this is the safe place to store them.

Then I am trying to access to my library with a simple Purebasic
program.

Code: Select all

;testin my dll
#True = 1
#False = 0
#myFTDI_lib = 5

LoadedmyFTDI = #False
		   If OpenLibrary(#myFTDI_lib, "libmyftdi.so") ;lib found (zero means not opened)
      		LoadedmyFTDI = #True
          MessageRequester("FTDI Library...", "Opening lib Ok!")
      Else
          MessageRequester ("Library...", "ERROR Opening my library")
      EndIf

if I try OpenLibrary(#myFTDI_lib,"/usr/local/lib/libmyftdi.so") it also wont work.

I tried also to make symbolic links with ln -s (cause I readed also in a forum) but it do not work

As you can see I am lost...

thanks for your help

Posted: Sat May 17, 2008 8:01 pm
by Foz
You can just put the .so file in the same directory as your executable.

The current problems sounds like some sort of permissions trouble.

Posted: Sat May 17, 2008 10:18 pm
by ManMartin
I also tried to place the so library where the purebasic ide is but no luck.

I use ubuntu 7.10 (I think)

my goal is to port my lighting programs to linux
I hope any of you can help me.

thanks again.