另:请告诉我具体的方法,或者告诉我哪里有,不用说什么“网上到处都有“等等,谢谢。
build-essential我已经安装了,我用如下指令编译:
代码: 全选
gcc -Wall filename -o fillname.o
当然,我有用#include <stdio.h>和#include <math.h>a.c: 在函数‘main’中:
a.c:15: 警告: 未使用的变量‘a’
/tmp/ccbeaU7S.o: In function `main':
a.c:(.text+0x1c7): undefined reference to `cos'
a.c:(.text+0x1e8): undefined reference to `sin'
a.c:(.text+0x237): undefined reference to `sin'
a.c:(.text+0x258): undefined reference to `cos'
a.c:(.text+0x2c8): undefined reference to `tan'
a.c:(.text+0x309): undefined reference to `cos'
a.c:(.text+0x34c): undefined reference to `cos'
a.c:(.text+0x381): undefined reference to `tan'
a.c:(.text+0x3c2): undefined reference to `cos'
a.c:(.text+0x405): undefined reference to `cos'
collect2: ld 返回 1