|
我用了,但出错了
程序为
#include <stdlib.h>
int main()
{
system("ls /etc/");
return 0;
}
用 gcc -o test test.cpp 编译后报错
/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
怎么解决?急啊 |
|