CodeBlocks錯誤


這不知道當時是在哪裏找到的答案,直接就貼進去了。

問題描述

第一次安裝並使用code::blocks10.5 編寫源代碼執行時出現這樣的錯誤提示:

"ccc - Debug" uses an invalid compiler. Probably the toolchain path within the compiler options is not setup correctly?! Skipping...
Nothing to be done.

解決原因

原因是因爲沒有制定編譯器路徑,可能是在安裝的時候沒有選擇安裝內置的編譯器。

解決方法

  1. 選擇”Menu”->Settings ->”Compiler and Debugger” ,然後會出現一個新的tab;
  2. 在這個彈出的Tab中,會顯示Compiler flagsLinker settingsSearch subdirectories等等,由於界面比較小,很多Tab標籤沒有顯示出來,點擊 “>” 按鈕2-3次, 直到發現出現Toolchain executables
  3. 在這個窗口中,設置compiler settings到你本機安裝的編譯器目錄,這個在Window是指的mingw編譯器或者cywin;

原始回答

下面是引用的原始的回答,出自哪裏記不清了,已經好幾年了,現在基本不用Code blocks了。

I encountered the same problem and solved it after a bit of tinkering…steps would be:

  1. goto “Menu”->Settings ->”Compiler and Debugger” -> [It will open a new Tab ]….. ->
  2. In this tab, you have listings like…Compiler flags, Linker settings, Search subdirectories,…… next to that is “>” button, click on the “>” button 2-3 times, till you find “Toolchain executables” in same line.
  3. In this window, set “compiler settings” to which ever directories your compiler is installed.
  4. For varification, goto lower section of tab-menu and click on location button for gcc or g++, it shoulddirectly open a new browser window and gcc /g++ is selected.
  5. If this is done, your code::blocks should be working

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章