|
|
我在看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好像是缺少主函数,如果是,主函数该怎样写呢? |
|