配置一个工程

问题描述:

要运行一个源码工程,工程中含有层级目录,.cpp与.h在多级目录中混合存储。并且该工程的运行依赖一些静态库(.lib)与动态库(.dll)。

建立:

  1. .h拷贝至$(ProjectDir)\include下,可以在search栏下用.h来搜索层级目录下所有*.h;
  2. 把*.cpp拷贝至$(ProjectDir)\src下;
  3. 第三方库拷贝至thirdparty目录下,并且分”include”、“lib”、(src)二级目录;
  4. VS下右击solution->add->existing item将所有.cpp、.h文件添加到工程中;
  5. Solution->property->configuration properties->C++->general->additional include directories->\((ProjectDir)\include;\)(ProjectDir)\thirdparty\include;
  6. Solution->property->configuration properties->linker->general-> additional include directories ->$(ProjectDir)\thirdparty\lib ->linker->input->additional dependencies: the name of lib
  7. 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

随机推荐

  1. Flex 布局教程:语法篇 【转】

    Flex 布局教程:语法篇   作者: 阮一峰 日期: 2015年7月10日 原文:http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html 网 ...

  2. 谈谈CSS中em与px的差异

    在国内网站中,包括三大门户,以及“引领”中国网站设计潮流的蓝色理想,ChinaUI等都是使用了px作为字体单位.只有百度好歹做了个可调的表率.而 在大洋彼岸,几乎所有的主流站点都使用em作为字体单位, ...

  3. POSIX.2 正则表达式

    By francis_hao    Oct 1,2017   这里的正则表达式主要是指扩展正则,也就是egrep(grep -e)用到的正则表达式. 字符 含义 类别说明 | 分割分支,正则表达式会去 ...

  4. [解决] Error Code: 1044. Access denied for user 'root'@'%' to database

    今天在测试集群用的mysql上,遇到个权限的问题: SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSynta ...

  5. 寻找最大连续子序列/Find the max contiguous subsequence

    寻找最大连续子序列 给定一个实数序列X1,X2,...Xn(不需要是正数),寻找一个(连续的)子序列Xi,Xi+1,...Xj,使得其数值之和在所有的连续子序列数值之和中为最大. 一般称这个子序列为最 ...

  6. phpstorm license 解决

    http://idea.lanyus.com/ sudo vim /etc/hosts 最后添加:  0.0.0.0 account.jetbrains.com 然后把获得的注册码,复制到,licen ...

  7. JavaScript字符串、数组操作总结一

    1.将数组转换成字符串 例子: var  arr=[1,2,3,4,5,6]; var  str=arr.join('|'); str输出为 “1|2|3|4|5|6” 2.数组indexOf()方法 ...

  8. Axis2 WebService(配置、发布、调用)

    准备工作 1.下载:axis2-1.5.4-bin.zip,axis2-1.5.4-war.zip 下载地址:http://axis.apache.org/axis2/java/core/ 2.环境变 ...

  9. 洛谷2115 [USACO14MAR]破坏Sabotage

    https://www.luogu.org/problem/show?pid=2115 题目描述 Farmer John's arch-nemesis, Farmer Paul, has decide ...

  10. 51Nod 1083 矩阵取数问题 | 动态规划

    #include "bits/stdc++.h" using namespace std; #define LL long long #define INF 0x3f3f3f3f3 ...