vs2019设置
# dll文件的设置
- 高级:字符集:使用多字节字符集
- C/C++ -> 预编译头: 预编译头: 不使用预编译头
-> 代码生成: 安全检查: 禁用安全检查
- 常规: 目标文件名: Debug加d,Release不需要修改
输出目录:$(SolutionDir)temp\$(Configuration)\$(ProjectName)\
中间目录:$(SolutionDir)temp\$(Configuration)\$(ProjectName)\
C++语言标准:ISO C++17标准
- 生成事件: 生成后事件 命令行
xcopy $(TargetPath) $(solutionDir)bin\ /y
xcopy $(outDir)$(TargetName).lib $(solutionDir)lib\ /y
xcopy $(solutionDir)$(projectName)\plugin1_global.h $(solutionDir)include\ /y
xcopy $(solutionDir)$(projectName)\op.h $(solutionDir)include\ /y
# application的设置
- 高级:字符集:使用多字节字符集
- C/C++ -> 预编译头: 预编译头: 不使用预编译头
-> 代码生成: 安全检查: 禁用安全检查
- 常规: 目标文件名: Debug加d,Release不需要修改
输出目录:$(SolutionDir)temp\$(Configuration)\$(ProjectName)\
中间目录:$(SolutionDir)temp\$(Configuration)\$(ProjectName)\
C++语言标准:ISO C++17标准
- 生成事件: 生成后事件 命令行
xcopy $(TargetPath) $(solutionDir)bin\ /y
- C/C++ ->常规: 附加包含目录: $(solutionDir)include\
- 调试:命令: $(solutionDir)bin\$(TargetName).exe
工作目录:$(solutionDir)bin\
- 右键 项目依赖项 勾选需要一起生成的项目
练习:使用cmake生成工程
# 常用调试方法
- 打印数据来调试程序
#ifdef _DEBUG
printf("%d",x);
#endif
- 普通断点
- 条件断点 a={a}
- 条件追踪
- 单步调试 F10 F11
- 添加监视