1. 程式人生 > >linux eclipse C++ gdb No symbol table is loaded. Use the "file" command

linux eclipse C++ gdb No symbol table is loaded. Use the "file" command

出現這個錯誤很有可能是在編譯命令列中缺少了“-g”編譯選項。具體設定可以在“project”->"properties"->"C/C++ Build"->"Settings"->"GCC C++Compiler"->"Debugging"中的Debug Level設定為Default(-g)或者更高(-g3)。

如果上述的選項已經設定了,重新編譯後的二進位制檔案還是出現同樣的錯誤,那麼很可能是在“project”->"properties"->"C/C++ Build"->"Settings"->"GCC C++ Linker"中的“Omit all symbol information”被選中了,將該選項的勾去掉,就不會有‘No symbol table is  loaded”錯誤了。