如何使用Dev C++调试(debug)c程序
方法1:(已驗證)
在“工具”-》編譯選項-》"Add?following?commands?when?calling?complier"下面的編輯框里加上: -g3
然后在下面的"Add?these?commands?to?the?linker?command?line"?下的編輯框上加上: -g3
轉到programs頁,把gcc行修改為:gcc.exe?-D__DEBUG__,
把g++行修改為: g++.exe?-D__DEBUG__?,
點擊ok。
重新編譯,就能調試了。
方法2:(本人未驗證)
在dev c++ 環境中,寫程序的時候,寫了一個類,但是有點問題,想調試一下,但是調試的時候,老出現這個問題
your project does not have debugging info, do you want to enable debugging and rebuild your project?
在網上搜了一下解決方法
在 tools --> compiler options --> compiler, 有一個選項是:
Add these commands to the linker command line
將此選項勾選,并將內容 添加為 -g3 -gstabs
轉載于:https://www.cnblogs.com/leelike/archive/2011/01/14/1935682.html
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的如何使用Dev C++调试(debug)c程序的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《Orange’s 一个操作系统的实现》
- 下一篇: effective C++ 读书笔记(0