Create a header file (* .h) for the shared library file (* .so)

I have a shared library file ( libmylib.so), but there is no header file ( mylib.h) for it.

Do you know some ways / tools to create this header file from a shared library file?

+5
source share
1 answer

This is not possible at all, since the .so file does not contain enough information about parameter lists, especially if non-standard types (for example, structures) are used, since the type information is not part of the .so file.

Even if only standard types are used, the argument list is not part of the ELF character table (see http://refspecs.linuxbase.org/elf/elf.pdf 1-15ff.).

, (= ), DWARF- , . ? .

+2

All Articles