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.
Create *.SO library
-
User_Russian
- Addict

- Posts: 1588
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Create *.SO library
You don't need a lib file equivalent on linux, Import works with shared objects as they are
Windows 11, Manjaro, Raspberry Pi OS


-
User_Russian
- Addict

- Posts: 1588
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Create *.SO library
You mean:But then it in the executable file be an absolute path to the so-file!
That is:
Code: Select all
Import "MyLib.so"
Funct(Param)
EndImportThat is:
On another computer, the program will not work because there is no such file path!/home/UserName/PureBasic/Files/TestProject/MyLib.so
-
User_Russian
- Addict

- Posts: 1588
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Create *.SO library
Prompt how to solve this problem?
Import is not meaningful because the absolute path!
Import is not meaningful because the absolute path!
Re: Create *.SO library
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
or install the .SO under usr/lib
Importing an .SO still uses dlopen under the hood as far as I know
Windows 11, Manjaro, Raspberry Pi OS


-
User_Russian
- Addict

- Posts: 1588
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Create *.SO library
In such case, better OpenLibrary() and prototypes.
Import in Linux, bad implemented.

Import in Linux, bad implemented.
