vs2008工程配置

一、添加H文件目录

依次点击“项目——配置属性——C/C++——常规”,

在“附加包含目录”中加入H文件所在的文件夹。(即项目所要用到的所有.h文件目录都要加进去)
 

二、添加LIB目录 

1)依次点击“项目——配置属性——链接器——常规”,在“附加库目录”中加入LIB所在目录
 
2)还没完,在“链接器”中找到“输入”,在“附加依赖项”中加入具体的lib库名字     或用#pragma comment(lib,"lua51.lib")
 

三、不是用预编译头

在编译时时候报错   在查找预编译头使用时跳过
环境:VS2008

微软官方解释:
Visual C++ Concepts: Building a C/C++ ProgramCompiler Warning (level 1) C4627Error Message
”: skipped when looking for precompiled header use
While searching for the location where a precompiled header is used, the compiler encountered an #include directive for the include file. The compiler ignores the #include directive, but issues warning C4627 if the precompiled header does not already contain the include file.
解决方案:
1、去掉预编译头
项目->属性->配置属性->c/c++->预编译头->创建使用预编译头->不使用预编译头  (为了跨平台不适用预编译)
2、将包含文件加到预编译头stdafx.h文件中
3、在每个.cpp中包含预编译头stdafx.h文件

  
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值