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

Windows下使用vim编写代码,使用nmake编译代码,使用vs来调试代码的更多相关文章

  1. [vim配置]windows下在vim中使用gcc/g++编译调试c/cpp文件

    在Linux里面混了一个多月,vim编程用得甚爽.无奈前天将Linux里面的编程文件夹误删,而技术不精无法找回,悲痛欲绝.再者,无限怀念windows里面的游戏,并觉得现在在Linux里面也学不到什么 ...

  2. 第21月第9日 windows下使用vim+ctags+taglist

    1. windows下使用vim+ctags+taglist 最近在公司的同事指导下,学会使用这个东西编写代码,效率提高了不少.所以记录下来,方便大家使用. 1. 下载gvim74.exe文件,并安装 ...

  3. Windows 下的 Makefile 编写

    Windows 下的 Makefile 编写(一)Makefile的基本规则 作者:cntrump Makefile对于很多人来说是陌生的,特别是习惯于使用 IDE 的人来说,似乎没有听说过 Make ...

  4. windows下vi/vim编辑器的基本操作

    windows下vi/vim编辑器的基本操作 Contents 1. 工具准备(下载gvim) 2. vi/vim基本入门 2.1. 安装 2.2. 基本使用 3. vi/vim基本命令表 1 工具准 ...

  5. windows下使用vscode编写运行以及调试Python

    更新于2018年10月: 首先去python官网下载python3  地址:https://www.python.org/downloads/windows/ 下载好后直接安装 记得勾选添加环境变量 ...

  6. Ubuntu下终端Vim编写C语言程序 AAAAA

    我是开虚拟机下的Ubuntu,装双系统又卸了,Ubuntu默认是不包含编辑器vim和编译器gcc.如果你是刚安装好的Ubuntu电脑,下面我们将来实现自己的第一个程序. 1.准备工作 首先进入root ...

  7. windows 下 gvim/vim lua支持问题,neocomplete等插件支持

    此文是按照知乎 https://www.zhihu.com/question/29333426 "windows下vim的lua支持问题?" 一文汇总的解决方案. 题主提供了不错的 ...

  8. Windows下使用Vim极简入门

    0.下载与安装 在vim官网下载 1.Vim常见的几种模式: 一般模式:主要用于浏览,不能随意删除.修改等.按Esc进入该模式. 插入模式:类似平常我们打开记事本后所在的模式.在命令模式下按i进入. ...

  9. windows下使用vscode编写运行以及调试C/C++

    未经允许,禁止转载,唯一出处:tangming博客园 最后更新于2019年4月4日: 多次更新,内容较多,篇幅较大,但如果是喜欢visual stdio code这款编辑器的话建议仔细阅读,有疑问的地 ...

随机推荐

  1. leetcode_Multiply Strings

    描写叙述: Given two numbers represented as strings, return multiplication of the numbers as a string. No ...

  2. 网络虚拟化基础协议之Geneve

    网络虚拟化最基础的技术莫过于分层(Overlay.Underlay),要实现分层有两种手段.一个是映射(Mapping),一个是封装(Encapsulation). 映射,主要思路是转发时替换报文语义 ...

  3. SpringMvc aop before

    1.config.xml配置文件 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans ...

  4. uva 11404 dp

    UVA 11404 - Palindromic Subsequence 求给定字符串的最长回文子序列,长度一样的输出字典序最小的. 对于 [l, r] 区间的最长回文串.他可能是[l+1, r] 和[ ...

  5. List中remove元素的理解

    今天写了个简单的list中remove元素的方法,结果报错... List<String> ll = Arrays.asList("1","2",& ...

  6. iis出现HTTP 错误 403.14 - Forbidden Web问题

    找到"目录浏览",并"应用"

  7. Mac 常用属性

    如果需要让隐藏的文件可见. 具体做法就是打开一个Terminal终端窗口,输入以下命令: 对于OS X Mavericks 10.9: defaults write com.apple.finder ...

  8. Java 学习 day03

    01-语句(while) 02-语句(do while) 03-语句(for) 04-语句(for和while的区别) 05-语句(循环语句的其他特点) 06-语句(for语句练习-累加&计数 ...

  9. 九度OJ 1072:有多少不同的面值组合? (计数)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:3112 解决:1591 题目描述: 某人有8角的邮票5张,1元的邮票4张,1元8角的邮票6张,用这些邮票中的一张或若干张可以得到多少种不同的 ...

  10. .net 开源框架--转载

    Json.NET http://json.codeplex.com/ Json.Net 是一个读写Json效率比较高的.Net框架.Json.Net 使得在.Net环境下使用Json更加简单.通过Li ...