LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 805|回复: 2

紧急求助:关于myerror.c

[复制链接]
发表于 2006-7-15 10:16:23 | 显示全部楼层 |阅读模式
我在看unix环境高级编程,我在编译标准出错处理函数(gcc -o myerror.o myerror.c -I/ourhdr.h)时提示[wyx@localhost test]$ gcc -o myerror.o myerror.c -I/ourhdr.h
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:77: undefined reference to `main'
/tmp/cc42IqgV.o(.text+0x7e): In function `err_msg':
: undefined reference to `va_stat'
collect2: ld returned 1 exit status
请问怎么解决啊,我刚刚开始学,   h好像是缺少主函数,如果是,主函数该怎样写呢?
 楼主| 发表于 2006-7-15 10:26:07 | 显示全部楼层
怎么没人嘛.....................
回复 支持 反对

使用道具 举报

发表于 2006-7-16 12:33:57 | 显示全部楼层
-I后面跟路径
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表