OpenCV : undefined reference to imread()

后端 未结 3 1864
鱼传尺愫
鱼传尺愫 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:33

    This function is located in opencv_imgcodecs library. It also worths mentioning that you may need to put your object file before libraries in order to link successfully:

    g++ -c -I/usr/include/opencv4/opencv -I/usr/include/opencv4 main.cpp
    g++ main.o -lopencv_imgcodecs $(OTHER_FLAGS) -o main
    

提交回复
热议问题