編譯時,C++項目,未定義的參考`atexit對」
我得到了這樣的錯誤:
/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?
在此先感謝。
你能編輯和添加有關此問題的詳細代碼嗎? – Vargan
是的,我更新了更多的錯誤細節 – olidev
我不知道你是否有代碼模板在你的項目中,但也許這可以幫助你:http://ubuntuforums.org/showthread.php?t=1388438 – Vargan