VS 2005 中使用 VC6.0中编写的Project 若干问题(08应该也可以)
2011-04-16 15:38
513 查看
1.如何在VS2005中加入编译好的库lib?
Re:在VC6.0中的Project settings的选项卡里面可以实现库的引用。在VS2005中也类似。
(1)Project -> Properties -> Configuration Properties -> Linker -> Genel 选项里面进行下列设置:
(2)Additional Library Directories 设置库文件所在路径;
(2)Link library Dependencies 设置为Yes;
(3)Use library Dependency Inputs 设置为Yes;
(4)在Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies中添加库的名称;
2.如何加入Include文件夹?
Re:在VC6.0中也是在Project Settings的C/C++的Include Derictory设置的。在VS2005中也类似。
(1)Project -> Properties -> Configuration Properties -> C/C++ -> Genel 选项的Additional Include directories 中加入要包含的头文件的目录即可。例如:添加C:/Programms/Microsoft Sdks/Windows/v6.0就是包含了Windows Vista Platform sdk的头文件夹。
3.Warning C4819:The file contains a character that can ot be represented in the current code page(936). save the file in unicode format to prevent data loss.
中文意思是:该文件包含不能在当前代码页中表示的字符,请将文件保存为Unicode格式,以防止数据丢失。
一般来说,这个警告没有什么影响。要想去掉这个警告的方法有:
(1)转换Code文件为Unicode格式;
(2)在Project -> Properties -> Configuration Properties -> C/C++ -> Advance 的 Disable Specific Warnings 中添加相应的警告编号:4819;
(3)或找出不符合Unicode格式的文件,然后在该文件的开始处加入下面的语句:
# pragma warning (disable:4819)
4.warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
这个问题是C语言里面某些函数的安全性检查通不过。消除Warning信息方法:
(1)按照编译器推荐的把函数改为安全的。例如:strcpy改为strcpy_s;itoa改为_itoa_s等等;
(2)或设置Project -> Properties -> Configuration Properties -> c/c++ -> Preprocessor -> Preprocessor Definitons里面添加 _CRT_SUCURE_NO_WARNINGS / _CRT_SUCURE_NO_DEPRECATE
文章出处:http://www.diybl.com/course/3_program/vc/vc_js/2007114/83624.html
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/LIUW_9/archive/2009/06/17/4275714.aspx
Re:在VC6.0中的Project settings的选项卡里面可以实现库的引用。在VS2005中也类似。
(1)Project -> Properties -> Configuration Properties -> Linker -> Genel 选项里面进行下列设置:
(2)Additional Library Directories 设置库文件所在路径;
(2)Link library Dependencies 设置为Yes;
(3)Use library Dependency Inputs 设置为Yes;
(4)在Project -> Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies中添加库的名称;
2.如何加入Include文件夹?
Re:在VC6.0中也是在Project Settings的C/C++的Include Derictory设置的。在VS2005中也类似。
(1)Project -> Properties -> Configuration Properties -> C/C++ -> Genel 选项的Additional Include directories 中加入要包含的头文件的目录即可。例如:添加C:/Programms/Microsoft Sdks/Windows/v6.0就是包含了Windows Vista Platform sdk的头文件夹。
3.Warning C4819:The file contains a character that can ot be represented in the current code page(936). save the file in unicode format to prevent data loss.
中文意思是:该文件包含不能在当前代码页中表示的字符,请将文件保存为Unicode格式,以防止数据丢失。
一般来说,这个警告没有什么影响。要想去掉这个警告的方法有:
(1)转换Code文件为Unicode格式;
(2)在Project -> Properties -> Configuration Properties -> C/C++ -> Advance 的 Disable Specific Warnings 中添加相应的警告编号:4819;
(3)或找出不符合Unicode格式的文件,然后在该文件的开始处加入下面的语句:
# pragma warning (disable:4819)
4.warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
这个问题是C语言里面某些函数的安全性检查通不过。消除Warning信息方法:
(1)按照编译器推荐的把函数改为安全的。例如:strcpy改为strcpy_s;itoa改为_itoa_s等等;
(2)或设置Project -> Properties -> Configuration Properties -> c/c++ -> Preprocessor -> Preprocessor Definitons里面添加 _CRT_SUCURE_NO_WARNINGS / _CRT_SUCURE_NO_DEPRECATE
文章出处:http://www.diybl.com/course/3_program/vc/vc_js/2007114/83624.html
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/LIUW_9/archive/2009/06/17/4275714.aspx
相关文章推荐
- VS 2005 中使用 VC6.0中编写的Project 若干问题
- VS 2005 中使用 VC6.0中编写的Project 若干问题
- vs. 2005也可以使用web application project, 如何把asp.net ajax特性加入呢?
- VS 2005 Web Application Project 项目中Profile的使用方法(更新)
- 关于“使用VS 2005和SQL Server 2005创建连接时不允许进行远程连接”的问题的解决
- vs 2005 + access 使用 like 问题
- VS 2005 中关于编译时使用那种字符集问题 (转载)
- Vista 中,使用VS 2005调试程序没有权限的问题?
- 使用UNICODE集应该注意的若干问题
- vc6.0程序到vs 2005的编译问题
- myeclipse 与 sql server 2005 连接 若干问题《一》请使用支持 JDBC 4.0 的 sqljdbc4.jar 类库
- VS 2005中使用Publish Web Site的一个问题
- 使用VS 2005 在SQL Server 2005 中创建自定义函数 UDF 时发生的问题
- 使用VS编写ASP.NET(C#)遇到问题及解决(持续补充)
- 雷塞SMC304系列控制器VC6.0例程在VS2015下编译遇到的若干问题及解决办法
- 关于Vs 2005 中出现编译通过,但运行时出现“未使用调试信息生成二进制文件”的问题
- 数据库SQL中的分钟表示应该使用MI(非常重要的一个问题,以前一直认为和java中一样,用mm就可以表示);校对规则(查询时区分大小写)
- VS 2005中怎么来配置可以使用AJAX的环境
- VS2005下写DLL应该注意的问题
- vs.net 2005 下多个web application project之间的session共享问题