我已经安装了opencv 3.1.0,我想编译以下程序:
#include <stdio.h>
#include "opencv/cv.h"
#include "opencv/highgui.h"
int main(void){
return 0;
}
但它会将error:undefined reference
返回cvRound
,依此类推文件在types_c.h
页文件中。
我知道它一定是链接问题,但我能链接的唯一库是:
opencv_world310.lib
,opencv_world310d.lib
我已经尝试将这些链接起来,但这并没有解决问题。 我使用GNU GCC编译器和动态库链接mingw32-g ++。exe。
根据互联网上的一些研究,我需要链接库,如:
`opencv_calib3d249d.lib`
opencv_contrib249d.lib
opencv_core249d.lib
opencv_features2d249d.lib
opencv_flann249d.lib
opencv_gpu249d.lib
opencv_highgui249d.lib
opencv_imgproc249d.lib
opencv_legacy249d.lib
opencv_ml249d.lib
opencv_nonfree249d.lib
opencv_objdetect249d.lib
opencv_ocl249d.lib
opencv_photo249d.lib
opencv_stitching249d.lib
opencv_superres249d.lib
opencv_ts249d.lib
opencv_video249d.lib
opencv_videostab249d.lib`
但那些不在我的lib
目录中!