我在LINUX下用c编写了一个程序,后端需要连接一个ORACLE 数据库.
数据库我已经手动建立起来了!
我用proc编译后,生成了cy.c文件(cy是文件名),但是用$gcc –o cy cy.c $ORACLE_HOME/lib/libclntsh.so这个命令连接,准备生成可执行文件的时候,
却出现了如下的错误:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-9
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function `_start':
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x1: undefined reference to `main'
collect2: ld returned 1 exit status
是怎么回事呢?
请大家指教!!
急等!
gcc –o
gcc -o
还是不行!!还是那个错误呢!!!
就是
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-9
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o: In function `_start':
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../crt1.o(.text+0x1: undefined reference to `main'
collect2: ld returned 1 exit status