Any idea about what I might be doing wrong?
The t function is indeed local to the library. This could happen due to a number or reasons. The most likely ones are:
- You declared the function
static, or - You compiled the library with
-fvisibility=hiddenand did not have__attribute__((visibility("default")))on the function, or - You linked this library with a linker version script (i.e. with
--version-script=libfoo.versionflag) that hides all functions, except those which are explicitly exported, and you didn’t add your function to that list.See this example of using
--version-scriptto limit symbol visibility.