Dev-C++使用點滴 (轉)

worldblog發表於2008-01-22
Dev-C++使用點滴 (轉)[@more@]

  Dev-C++是一個在下用使用gcc的,我目前使用的版本是4.9.8.0版,地址為DOWNLOADs/devcpp4980.exe,可">http://www.c-view.org/soft/devcpp/downloads/devcpp4980.exe,可以在它自己的主頁/或">或forge.net/projects/dev-cpp/中">http://sourceforge.net/projects/dev-cpp/中找到關於Dev-C++的更多資訊.

1.在Dev-C++中
  用Dev-C++編寫C++專案時,如果用選單"DeDebug"除錯時,會提示"Your project does not have debugging information, do you want to enable debugging and rebuild your project?",此時即使選"Yes"也還是不能除錯.要在"Project/Class Brower"視窗中(透過ViewProject/Class Brower調出該視窗),然後選中專案按右鍵,選"Project Options"在"Compiler"頁中選"Linker"項,將其中的"Generate debugging information"設為"Yes".此時再重新連結一次程式,就可以除錯了.

2.觀察變數
  在除錯中觀察變數值時,string型別的變數如果先加入到了Debug視窗中,單步走時是不會自動重新整理的,所以需要將已經加入的變數刪除後再新增才能看到新的值,但對int這樣的變數是可以自動重新整理的.

3.恢復c,cpp等與VC的關聯
  由於程式有bug,所以不管選不選於C,C++檔案關聯,安裝完成後C,Cpp,H,rc等都會自動與Dev-C++關聯,如果在"ToolsEmvironment Options"的"File Associ..."頁中將與c,cpp,h,rc的關聯去除,也不能恢復本來與VC的關聯,而且在中透過"工具資料夾選項"的檔案型別中,也看不到c,cpp,h,rc了.此時可以將下列內容放入一個副檔名為reg的檔案中,匯入到登錄檔中.注意,下面例子中, 6安裝在F:Program Files Visual Studio目錄下,所以要根據具體情況修改路徑.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREClassescfile]
@="C Source file"
"AlwaysShowExt"=""

[HKEY_LOCAL_MACHINESOFTWAREClassescfileDefaultIcon]
@="F:Program FilesMicrosoft Visual StudioCommonMSDev98Binmsdev.exe,-20210"

[HKEY_LOCAL_MACHINESOFTWAREClassescfile]

[HKEY_LOCAL_MACHINESOFTWAREClassescfileshell&Open with MSDev]
@="&Open with MSDEV"

[HKEY_LOCAL_MACHINESOFTWAREClassescfileshell&Open with MSDevcommand]
@=""F:Program FilesMicrosoft Visual StudioCommonMSDev98Binmsdev.exe" "%1""

[HKEY_LOCAL_MACHINESOFTWAREClassescfileshell&Open with MSDevddeexec]
@="Open("%1")"

[HKEY_LOCAL_MACHINESOFTWAREClassescfileshell&Open with MSDevddeexecapplication]
@="msdev"

[HKEY_LOCAL_MACHINESOFTWAREClassescfileshell&Open with MSDevddeexectopic]
@="system"


[HKEY_LOCAL_MACHINESOFTWAREClassescppfile]
@="C++ Source file"
"AlwaysShowExt"=""

[HKEY_LOCAL_MACHINESOFTWAREClassescppfileDefaultIcon]
@="F:Program FilesMicrosoft Visual StudioCommonMSDev98Binmsdev.exe,-20209"

[HKEY_LOCAL_MACHINESOFTWAREClassescppfileshell]

[HKEY_LOCAL_MACHINESOFTWAREClassescppfileshell&Open with MSDev]
@="&Open with MSDEV"

[HKEY_LOCAL_MACHINESOFTWAREClassescppfileshell&Open with MSDevcommand]
@=""F:Program FilesMicrosoft Visual StudioCommonMSDev98Binmsdev.exe" "%1""

[HKEY_LOCAL_MACHINESOFTWAREClassescppfileshell&Open with MSDevddeexec]
@="Open("%1")"

[HKEY_LOCAL_MACHINESOFTWAREClassescppfileshell&Open with MSDevddeexecapplication]
@="msdev"

[HKEY_LOCAL_MACHINESOFTWAREClassescppfileshell&Open with MSDevddeexectopic]
@="system"

[HKEY_LOCAL_MACHINESOFTWAREClassesrcfile]
@="Resource Template"
"AlwaysShowExt"=""

[HKEY_LOCAL_MACHINESOFTWAREClassesrcfileDefaultIcon]
@="F:Program FilesMicrosoft Visual StudioCommonMSDev98Binmsdev.exe,-20212"

[HKEY_LOCAL_MACHINESOFTWAREClassesrcfileshell]

[HKEY_LOCAL_MACHINESOFTWAREClassesrcfileshell&Open with MSDev]
@="&Open with MSDEV"

[HKEY_LOCAL_MACHINESOFTWAREClassesrcfileshell&Open with MSDevcommand]
@=""F:Program FilesMicrosoft Visual StudioCommonMSDev98Binmsdev.exe" "%1""

[HKEY_LOCAL_MACHINESOFTWAREClassesrcfileshell&Open with MSDevddeexec]
@="Open("%1")"

[HKEY_LOCAL_MACHINESOFTWAREClassesrcfileshell&Open with MSDevddeexecapplication]
@="msdev"

[HKEY_LOCAL_MACHINESOFTWAREClassesrcfileshell&Open with MSDevddeexectopic]
@="system"

[HKEY_LOCAL_MACHINESOFTWAREClasseshfile]
@="C Header file"
"AlwaysShowExt"=""

[HKEY_LOCAL_MACHINESOFTWAREClasseshfileDefaultIcon]
@="F:Program FilesMicrosoft Visual StudioCommonMSDev98Binmsdev.exe,-20211"

[HKEY_LOCAL_MACHINESOFTWAREClasseshfileshell]

[HKEY_LOCAL_MACHINESOFTWAREClasseshfileshell&Open with MSDev]
@="&Open with MSDEV"

[HKEY_LOCAL_MACHINESOFTWAREClasseshfileshell&Open with MSDevcommand]
@=""F:Program FilesMicrosoft Visual StudioCommonMSDev98Binmsdev.exe" "%1""

[HKEY_LOCAL_MACHINESOFTWAREClasseshfileshell&Open with MSDevddeexec]
@="Open("%1")"

[HKEY_LOCAL_MACHINESOFTWAREClasseshfileshell&Open with MSDevddeexecapplication]
@="msdev"

[HKEY_LOCAL_MACHINESOFTWAREClasseshfileshell&Open with MSDevddeexectopic]
@="system"

然後在"工具資料夾選項"的檔案型別中,刪除c,cpp,h,rc型別,再重新建立,建立型別時按下"高階"按鈕,選擇"關聯的檔案型別"
c選C Source file
cpp選C++ Source file
h選C Header file
rc選Resource Template


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10752043/viewspace-998166/,如需轉載,請註明出處,否則將追究法律責任。

相關文章