VS的使用
配置一个工程
问题描述:
要运行一个源码工程,工程中含有层级目录,.cpp与.h在多级目录中混合存储。并且该工程的运行依赖一些静态库(.lib)与动态库(.dll)。
建立:
- 把.h拷贝至$(ProjectDir)\include下,可以在search栏下用.h来搜索层级目录下所有*.h;
- 把*.cpp拷贝至$(ProjectDir)\src下;
- 第三方库拷贝至thirdparty目录下,并且分”include”、“lib”、(src)二级目录;
- VS下右击solution->add->existing item将所有.cpp、.h文件添加到工程中;
- Solution->property->configuration properties->C++->general->additional include directories->\((ProjectDir)\include;\)(ProjectDir)\thirdparty\include;
- Solution->property->configuration properties->linker->general-> additional include directories ->$(ProjectDir)\thirdparty\lib ->linker->input->additional dependencies: the name of lib
- Set output path: Solution->property->configuration properties->general -> output directory : .\bin
error 1:
include iostream: skipped when looking for precompiled header use
Solution: #include “stdafx.h”在文件的最上方
快捷键
F10 //next
F11 //step into
Shift F11 //step out
F5 //run to next break point
F9 //set break point
随机推荐
- TCP的连接(三次握手)和释放(四次挥手)
1 http都设置哪些header? http协议规定:一个完整的客户端发送给服务端的HTTP请求包括: (1)请求行:包括了请求方法.请求资源路径.HTTP协议版本,eg:GET/Server/im ...
- derby数据库windows自带的客户端
本示例演示用windows自带的ij来操作derby数据库,包括建库,建表,插入数据,查询数据 首先要配置环境变量: 其次打开cmd输入如下图所示的命令: java代码如下: package com. ...
- sudoers文件配置
http://note.drx.tw/2008/01/linuxsudo.html foobar ALL=(ALL) ALL 現在讓我們來看一下那三個 ALL 到底是什麼意思.第一個 ALL 是指網路 ...
- Eclipse中安装插件的三种方式
转载自:http://www.cnblogs.com/lcgustc/archive/2013/01/03/2843496.html Eclipse也用了很久,但是都没有怎么去研究过怎么安装插件,今天 ...
- hdu4085 Peach Blossom Spring
Peach Blossom Spring http://acm.hdu.edu.cn/showproblem.php?pid=4085 Time Limit: 10000/5000 MS (Java/ ...
- 【NOIP】提高组2014 解方程
[题意]已知n次方程(n<=100)及其所有系数(|ai|<=10^10000),求[1,m]中整数解的个数(m<=10^6). [算法]数论 [题解]如果f(x)=0,则有f(x) ...
- gridveiw的使用
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI ...
- LCA入门题集小结
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2586 题目: How far away ? Time Limit: 2000/1000 MS (Jav ...
- Brave Game HDU1846(巴什博弈)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1846 题目: Problem Description 十年前读大学的时候,中国每年都要从国外引进一些电 ...
- js_如何优化你的代码让它更好看
1.对于美的东西我们很难拒绝,比如美女.哈哈哈,程序员的梗. 2.所以我希望我写出来的代码也是很美观的,让人看起来会很舒服. 3.要想让你的代码简约美观,就要涉及封装,模块化了,可复用代码.vue可以 ...