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

Linux specific forum
ManMartin
New User
New User
Posts: 5
Joined: Sun Jan 27, 2008 12:07 am
Location: Spain

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

Post 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
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Post 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.
ManMartin
New User
New User
Posts: 5
Joined: Sun Jan 27, 2008 12:07 am
Location: Spain

Post 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.
Post Reply