1、编写代码

2、编写Makefile,如果要调试,

  2.1、需要在编译的时候加上/Zi ( Generates complete debugging information),编译由cl.exe来完成

  2.2、需要在链接选项中指定/DEBUG,(The /DEBUG option creates debugging information for the .exe file or DLL.

The linker puts the debugging information into a program database (PDB). It updates the PDB during subsequent builds of the program.

An .exe file or DLL created for debugging contains the name and path of the corresponding PDB. The debugger reads the embedded name and uses the PDB when you debug the program. The linker uses the base name of the program and the extension .pdb to name the program database, and embeds the path where it was created. To override this default, set /PDB and specify a different file name.)这样就会生成pdb文件,链接由link.exe来完成

3、devevn.exe 执行文件 (打开ide,  在源码文件中打上断点,或参考云风大神的博文:IDE 不是程序员的唯一选择(一),使用中断语句直接在代码中加断点)

以下是一个Makefile文件,来自《深入浅出MFC 第二版》

Hello.exe: StdAfx.obj Hello.obj Hello.res
link.exe /nologo /Debug /subsystem:windows /incremental:no \
/machine:I386 /out:"Hello.exe" \
Hello.obj StdAfx.obj Hello.res \
mfc80d.lib StdAfx.obj: StdAfx.cpp StdAfx.h
cl.exe /nologo /MDd /W3 /GX /O2 /D "WIN32" /D "DEBUG" /D "_WINDOWS" \
/D "_AFXDLL" /D "_MBCS" /Fp"Hello.pch" /Yc"StdAfx.h" /c StdAfx.cpp Hello.obj: Hello.cpp Hello.h StdAfx.h
cl.exe /nologo /MDd /W3 /GX /O2 /D "WIN32" /D "DEBUG" /D "_WINDOWS" \
/D "_AFXDLL" /D "_MBCS" /Fp"Hello.pch" /Yc"StdAfx.h" /c Hello.cpp Hello.res: Hello.rc Hello.ico
rc.exe /l 0x404 /Fo"Hello.res" /D "DEBUG" /D "_AFXDLL" Hello.rc Clean:
del *.exe *.obj *.res *.manifest *.pch *.pdb

最新文章

  1. Apache2 worker
  2. winform 可拖动的自定义Label控件
  3. PowerDesigner连接mysql逆向生成pdm
  4. MySQL Replication的相关文件
  5. readDouble
  6. JavaScript高级之函数的四种调用形式
  7. ubuntu下MySQL安装配置及基本操作
  8. ios 限制输入长度
  9. NEC遥控信号解码(包含完整代码)
  10. boost事件处理
  11. 解决jsp中编辑和删除时候弹出框闪退的问题。
  12. 20165337学习基础和C语言基础调查
  13. 【原】The Linux Command Line - Workiing with commands
  14. api日常总结
  15. Linux如何从零开始搭建rsync服务器(centOS6)
  16. Netbeans配置Java SE嵌入式平台(树莓派)
  17. 【hihoCoder】【挑战赛#12】
  18. Z-score标准化[转载]
  19. JavaScript里的循环方法之forEach,for-in,for-of
  20. KNN笔记

热门文章

  1. 自定义带下划线文本的UIButton
  2. robotframework使用之RIDE的底部的日志没显示怎么办?
  3. Scrapy安装向导
  4. Redis(六):java里常用的redis客户端(Jedis和Redisson)
  5. 小东和三个朋友一起在楼上抛小球,他们站在楼房的不同层,假设小东站的楼层距离地面N米,球从他手里自由落下,每次落地后反跳回上次下落高度的一半,并以此类推知道全部落到地面不跳,求4个小球一共经过了多少米?(数字都为整数) 给定四个整数A,B,C,D,请返回所求结果。
  6. u-boot-2014-04 网络不通解决一例
  7. js中insertAdjacentHTML的玩法
  8. 【转】基于eclipse进行ndk开发的环境配置
  9. CI去掉 URL 中的 index.php
  10. Hadoop常见异常及其解决方式