gcc编译问题请教。。。undefined reference to
一个system C(其实就是CPP的一个扩展)程序。编译
gcc -c没有问题 但是gcc -o 就不行了报错如下,谁给看看,谢谢。
/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+0x18): undefined reference to `main'
/tmp/ccZKFTjj.o: In function `sc_main':
/tmp/ccZKFTjj.o(.text+0x5b): undefined reference to `sc_module_name::sc_module_name(char const *)'
/tmp/ccZKFTjj.o(.text+0x8d): undefined reference to `sc_module_name::sc_module_name(char const *)'
/tmp/ccZKFTjj.o(.text+0xbf): undefined reference to `sc_module_name::sc_module_name(char const *)'
/tmp/ccZKFTjj.o(.text+0x15b): undefined reference to `sc_module::operator<<(sc_interface &)'
/tmp/ccZKFTjj.o(.text+0x166): undefined reference to `sc_module::operator<<(sc_interface &)'
/tmp/ccZKFTjj.o(.text+0x19c): undefined reference to `sc_module::operator<<(sc_interface &)'
/tmp/ccZKFTjj.o(.text+0x1a7): undefined reference to `sc_module::operator<<(sc_interface &)'
/tmp/ccZKFTjj.o(.text+0x1b2): undefined reference to `sc_module::operator<<(sc_interface &)'
/tmp/ccZKFTjj.o(.data+0x0): undefined reference to `sc_interface type_info node'
/tmp/ccZKFTjj.o: In function `sc_port_b<sc_signal_in_if<sc_dt::sc_bit> >::add_interface(sc_interface *)'
:。。。。。。。。。。。。。。。。。
/tmp/ccZKFTjj.o(.sc_pvector_base::gnu.linkonce.t.push_back(void *)+0x24): undefined reference to `sc_pvector_base::resize(int)'
collect2: ld returned 1 exit status