如果要想达到你现在的效果,那么主函数链接时加个 -rdynamic 参数吧,具体 man dlopen
External references in the library are resolved using the libraries in that library’s dependency list and any other libraries
previously opened with the RTLD_GLOBAL flag. If the executable was linked with the flag "-rdynamic" (or, synonymously,
"--export-dynamic"), then the global symbols in the executable will also be used to resolve references in a dynamically
loaded library. 作者: 深蓝苹果 时间: 2012-02-13 09:53
嗯,试验了 -rdynamic ,有效~作者: 羽剑天涯 时间: 2015-12-10 15:16 回复 2# drangon