|
在linux下我用如下的命令去单步编译
gcc -c ADInclude.c
gcc -c test2.c
gcc -o test test2.o ADInclude.o
可以编译通过,但我用makefile文件去编译就会出错
/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'
collect2: ld returned 1 exit status
makefile文件的内容为
test2:test2.o ADInclude.o
gcc -o test2.o ADInclude.o
ADInclude.o:ADInclude.c
gcc -c ADInclude.c
test2.o:test2.c
gcc -c test2.c
|
|