编译时出错,有关extern C的问题? 求救
四十大度 2003-04-11 09:20:39 我在sun下编译一个C++程序时,遇到这样的错误:
CC -c -g -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -D__svr4__ -DUSE_SHM -DHAVE_LIBTCLCL1_0B5 -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_0A2 -DHAVE_OTCL_H -DHAVE_LIBTK8_0 -DHAVE_TK_H -DHAVE_LIBTCL8_0 -DHAVE_TCL_H -I. -I../TclCL -I../otcl -I../tkbox/include -I../tclbox/include -o rng.o rng.cc
"rng.cc", line 56: Error: Only one of a set of overloaded functions can be extern "C".
"rng.cc", line 61: Error: Only one of a set of overloaded functions can be extern "C".
2 Error(s) detected.
*** Error code 2
make: Fatal error: Command failed for target `rng.o'
rng.cc文件中的代码是这样的:
#if defined(sun)
extern "C" {
int atoi(...);
int gettimeofday(...);
}
#endif
请问这是怎么回事?我应该怎么修改?