在编译 C++ 项目时,
我收到了一个错误:
/usr/lib/gcc/i686-linux-gnu/4.7/../../../i386-linux-gnu/crt1.o: In function `_start':
(.text+0xc): undefined reference to `__libc_csu_fini'
/usr/lib/gcc/i686-linux-gnu/4.7/../../../i386-linux-gnu/crt1.o: In function `_start':
(.text+0x11): undefined reference to `__libc_csu_init'
....: undefined reference to `atexit'
collect2: error: ld returned 1 exit status
这是代码:
std::atexit(myExitFunction);
myExitFunction 已被很好地声明。为什么会抱怨atexit?