Vc中添加lib和h文件

时间:2021-07-27 09:30:24

 Vc中添加libh文件

全局设置

l         Tool->options->directories 设置文件路径

#program comment(lib,’yourlib.lib’)

#include “yourh.h”

 

项目设置

l         Project->setting->link->general->object/libraries moduls 添加lib

#prgram comment(lib,”yourlib.lib”)

#include “yourlib.h

配置Visual C++ 6.0

[编辑]

全局设置

菜单Tools->Options->Directories:先设置lib路径,选择Library files,在下方填入路径:

C:/Program Files/OpenCV/lib

然后选择include files,在下方填入路径:

C:/Program Files/OpenCV/cxcore/include

C:/Program Files/OpenCV/cv/include

C:/Program Files/OpenCV/cvaux/include

C:/Program Files/OpenCV/ml/include

C:/Program Files/OpenCV/otherlibs/highgui

C:/Program Files/OpenCV/otherlibs/cvcam/include

[编辑]

项目设置

每创建一个将要使用OpenCVVC Project,都需要给它指定需要的lib。菜单:Project->Settings,然后将Setting for选为All Configurations,然后选择右边的link标签,在Object/library modules附加上

cxcore.lib cv.lib ml.lib cvaux.lib highgui.lib cvcam.lib

如果你不需要这么多lib,你可以只添加你需要的lib

取自"http://www.opencv.org.cn/index.php/VC6%E4%B8%8B%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE"