News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

How to create a simple dynamic link library?

Started by tiger, November 12, 2006, 09:32:39 AM

Previous topic - Next topic

tiger

Hi all.

I'm trying to create a dynamic link library (.so file on linux-ubuntu).
Here is my config:


After building I only get a .so file. I think there should be a .sa or .a file created too.
Anyone shows me how to create a simple working dynamic link library?

Thank you  :)

mandrav

I don't understand the question. The .so file is the dynamic link library (shared object). The .a file would be produced if you were creating a static link library.
Be patient!
This bug will be fixed soon...

tiger

I mean there should be a .sa created to link with the dynamic link lib file.
If there is only a .so file, how can I use it? (use functions stored in .so file in a new program).

tiger

Finally, I know the answer. In linux we don't need an import library to use a shared library (.so file).
We only have to add extern "C" in front of each function we want to export.  :lol:

Game_Ender

With gcc and ld you don't need an import library and you don't have to extern anything.  Those two things are "features" on windows.