OpenCV : undefined reference to imread()

后端 未结 3 1863
鱼传尺愫
鱼传尺愫 2021-02-12 23:52

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:27

    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;
    

提交回复
热议问题