Page 1 of 1
Create *.SO library
Posted: Tue Dec 31, 2013 12:21 pm
by User_Russian
In Windows, when you create a DLL, created also LIB-file.
In Linux, when creating SO library does not create *.a file! How to create it? Need for import functions from SO libraries.
Re: Create *.SO library
Posted: Wed Jan 01, 2014 8:34 pm
by idle
You don't need a lib file equivalent on linux, Import works with shared objects as they are
Re: Create *.SO library
Posted: Wed Jan 01, 2014 9:53 pm
by User_Russian
You mean:
Code: Select all
Import "MyLib.so"
Funct(Param)
EndImport
But then it in the executable file be an absolute path to the so-file!
That is:
/home/UserName/PureBasic/Files/TestProject/MyLib.so
On another computer, the program will not work because there is no such file path!
Re: Create *.SO library
Posted: Fri Jan 03, 2014 12:11 pm
by User_Russian
Prompt how to solve this problem?
Import is not meaningful because the absolute path!
Re: Create *.SO library
Posted: Fri Jan 03, 2014 10:45 pm
by idle
Try adding the program path to the enviroment path on start up
or install the .SO under usr/lib
Importing an .SO still uses dlopen under the hood as far as I know
Re: Create *.SO library
Posted: Sat Jan 04, 2014 11:41 am
by User_Russian
In such case, better OpenLibrary() and prototypes.
Import in Linux, bad implemented.
