【发布时间】:2015-06-07 13:24:06
【问题描述】:
我正在使用这样的程序,其中使用了 math.h 函数“sin”和 stdio.h 函数“printf”
#include <stdio.h>
#include <math.h>
int main ()
{
int x = sin(14);
printf("hello");
return 0;
}
正如 ephemient here 所说,libc.so 和 libm.so(用于数学函数)应该已经与程序链接,尽管当我使用选项“在目标文件上运行 otool(类似于 objdump)时” -L" 打印使用的共享库,libc.so 或 libm.so 都不打印
otool -L com_ex1.o
那是什么原因呢?我使用 otool 错了吗?或者那些库不应该显示为共享库?
【问题讨论】:
标签: c macos unix objdump otool