OpenCV : undefined reference to imread()

后端 未结 3 1578
臣服心动
臣服心动 2021-02-12 23:42

I have configured OpenCV 3.1.0 in Eclipse Mars. These are my configuration,

G++ includes: D:/opencv/build/install/include; GCC includes

3条回答
  •  再見小時候
    2021-02-13 00:36

    I recommend to link the following libraries:

    opencv_core
    opencv_highgui
    opencv_imgproc
    opencv_imgcodecs
    

    And in the .cpp file, you can include like this

        #include 
        #include 
        #include 
        #include 
    
        using namespace std;
        using namespace cv;
    

    Or

        #include 
        #include 
    
        using namespace std;
        using namespace cv;
    

提交回复
热议问题