Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Showing results for 
Search instead for 
Did you mean: , is it a pure "C" library or C++ library?

Occasional Contributor , is it a pure "C" library or C++ library?

I would like to know whether the following are pure C libraries or "C++" libraries?

Stephen Keane
Honored Contributor

Re: , is it a pure "C" library or C++ library?

A quick check would be to do an nm on them. If they are C++ libraries then the function names will probably be mangled, if they are mangled then it is definitely a C++ library. If they aren't mangled, it could still be a C++ library (specially compiled) or more likely a C library.

If you are not sure, post the result of nm on each of them and we can take a look for you.,
are C++ libraries, I believe.

Occasional Contributor

Re: , is it a pure "C" library or C++ library?

Steve, Thanks a lot for the quick response.

I did "nm" on the files, but it does not show any symbols. (Probably they are stripped). But the symbols are displayed when I did "nm" on solaris libraries.
I have attached the output of nm on

I also looked for files using
nm |grep FILE
This listed only .c files. Does it mean that it is a pure "c" library?

Eric Antunes
Honored Contributor

Re: , is it a pure "C" library or C++ library?

Hi Srinivasa,

I think they are Pro*C/C++ libraries (See Pro*C/C++ Precompiler Release 8.0 Programmer's Guide).

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Alexey Roytman
Frequent Advisor

Re: , is it a pure "C" library or C++ library?

Generally, a pure C library differs from C++ library by 2 things:
1. C++ one may be linker to C++ runtime library (libCrun);
2. startup code (init/fini) symbols on library loading/unloading are defined.

I've cheched for being C or C++, and can not tell you about it anything. There are pros and contras:

1. no mangled names -- maybe, all C++ symbols are remapped at linking, or [extern "C"] used
2. there are init/fini functions in there, but I can not find the INIT/FINI attribute for them

Thus, if you want to load it dynamically, I recommend to do: