Why do I get the following warning from the linker: “ld: warning: symbol clog has differing types”?
The linker warns about the pair of weak symbols that have different types when you link libm.so.2 and the classic iostream library in the same program. You can ignore the warning. The default math library on Solaris 10 is libm.so.2 and it contains the complex log function ‘clog’ in the global namespace as required by the C99 standard. If you use C++ classic iostreams by specifying -compat=4 or by specifying -library=iostream, you get the buffered standard error stream ‘clog’ in the global namespace. (Standard iostreams does not have this conflicting symbol.) We have adjusted headers and libraries to silently rename each of these ‘clog’ symbols so that you can use both in one program. However, we must retain the original symbol spellings as weak symbols in each of the libraries, so that old binaries looking for the original symbols can continue to link. Be sure to get iostream and math declarations by including the appropriate system headers rather than declaring any of these entities y