rev = cosine(3.1415926); // 使用cos函数 printf("The cos result is: %f\n", rev);
dlclose(handle);
return 0; }
6. GNU/Linux下动态库之加载器为/lib/ld-linux.so, 可执行的。
/lib/ld-linux.so ./cos <===> ./cos
7. 有用的环境变量
LD_LIBRARY_PATH
指定运行时动态库的搜索路径
LD_DEBUG
调试用,其值可为:
libs display library search paths reloc display relocation processing files display progress for input file symbols display symbol table processing bindings display information about symbol binding versions display version dependencies all all previous options combined statistics display relocation statistics unused determined unused DSOs help display this help message and exit