您的位置:首页 > 其它

vs2008常用操作汇总

2011-02-11 13:43 281 查看
1、OpenCV2.1环境配置:

(1)、Tools-->Options-->Projects and Solutions-->VC++Drectories: Show directories for选择include files,加入目录 D:/Program Files/OpenCV2.1/include/opencv ;Show directories for选择library files,加入目录 D:/Program Files/OpenCV2.1/lib 。

(2)、为项目的Debug配置增加依赖的库:选中项目名-->点击鼠标右键-->选择Properties-->Configuration中选择Active(Debug)-->Configuration Properties-->Linker-->Input-->Additional Dependencies:cxcore210d.lib cv210d.lib highgui210d.lib。

(3)、为项目的Release配置增加依赖的库:选中项目名-->点击鼠标右键-->选择Properties-->Configuration中选择Release-->Configuration Properties-->Linker-->Input-->Additional Dependencies:cxcore210.lib cv210.lib highgui210.lib。

(4)、配置属性-字符集修改为使用“多字节字符集” (由于2008默认是以Unicode字符集编译的):选中项目名-->点击鼠标右键-->选择Properties-->Configuration中选择Active(Debug)-->Configuration Properties-->General-->Project Defaults-->Character Set:Use Multi-Byte Character Set,点击应用;Configuration中选择Release-->Configuration Properties-->General-->Project Defaults-->Character Set:Use Multi-Byte Character Set,点击应用。

2、代码对齐:Alt + F8(需改变设置才能生效,步骤:Tools-->Options-->Environment-->Help-->Keyboard-->Apply the following additional keyboard mapping scheme:Visual Studio 6)。

3、Release或Debug版互换:Build-->Configuration Manager-->Active solution configuration:选择Release或Debug即可(简单方法:工具栏上有一下拉列表框,在其中直接选择Debug或Release即可)。

4、仅查看输出窗口中的error或Warnings:View-->Other Windows-->Error List(快捷键:Ctrl + / + E)。

5、标签快捷键的使用:(1)、设置标签(清除一个标签):Ctrl + K + K;(2)、查看上一标签:Ctrl + K + P;(3)、查看下一标签:Ctrl + K + N;(4)、显示标签窗口:Ctrl + K + W,此窗口中有一些标签操作按钮,使用起来很方便。

6、出现:error C2859 vc90.idb is not the idb file that was used when this precompiled header was created。。,解决方法:选中工程-->点击右键属性-->Configuration Properties-->C/C++-->Output Files-->Program Database File Name中的$(IntDir)/vc90.pdb改为$(IntDir)/(工程名).pdb即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: