I am building a shared library with the CMake add_library command as follows:
add_library(mylibname OPTION SHARED SOURCES ${source_files} HEADERS ${header_files})
When I inspect this library with 'nm', I find that some symbols are marked globally visible ("T"), and others are only internally visible to the library ("t"). My question is, why? What determines the symbol visibility when I haven't done anything in particular to control it?
I ask because it just so happens that when I link this library to another part of the project I get undefined reference errors, and it is because the symbols I need are apparently only internally visibile to the library for some reason. So I want to change a "t" to a "T" somehow, but, since I don't know what causes it to be a "t" in the first place, I figure that I would like to know that first :).
The symbol in question happens to be a specialisation of a template function, so perhaps the default visibility has to do with templates or something?