C ++ class export from .SO (linux)

How can I export the entire class to a shared library? Can I use this library in other languages? (pascal)

+4
source share
2 answers

By default, all characters are visible in the Linux shared library. So, everything you need to use the class from another program has already been exported.

Typically, C ++ classes cannot be used directly by other languages, but there are several ways around this. For example, you can write a C shell or use SWIG.

+2
source

By default, each function in a shared object is exported. Therefore, if you are not using the script builder to change this default, you should be good to go.

There are several ways to change this default value. For example, specifying -Blocal will abbreviate any characters not assigned to the version. Are you using a flag?

+1
source

Source: https://habr.com/ru/post/1301986/


All Articles