I would like to expand my library, which currently only compiles using gcc, which will also be used by Solaris Studio.
My idea is to do the following:
- Write shell functions in C that expose the corresponding parts of the interface using extern C.
- Then create this library with gcc. The resulting c-header and binary are compiler independent since the name no longer exists.
- Include the c-header and link in a project compiled using Solaris Studio.
Question: Is this an acceptable approach or is there a better solution to this problem?
Note. In addition to managing names, also look at issues related to exception handling .
source share