我在编译程序时遇到了这个问题: cc -I/home/l/d/songunix -L/home/l/d/songunix -lourhdr a.c
我把你给的头文件ourhdr.h和libourhdr.a都放在了/home/l/d/songunix 目录了,a.c是我编译的文件,为啥提到这个错误:
Undefined first referenced
symbol in file
err_quit a.o
err_sys a.o
ld: fatal: Symbol referencing errors. No output written to a.out
-bash-3.00$ cc a.c -I/home/l/d/songunix -L/home/l/d/songunix -lourhdr
Undefined first referenced
symbol in file
stderr /home/l/d/songunix/libourhdr.a(err.o)
stdout /home/l/d/songunix/libourhdr.a(err.o)
__errno_location /home/l/d/songunix/libourhdr.a(err.o)
ld: fatal: Symbol referencing errors. No output written to a.out