请教一个关于ubuntu下openCV程序编译出错的问题
1个回答
展开全部
用下面的这个命令是可以编译通过的,但有俩个警告
arm-linux-g++ -o opencv_test.o test.c -I /usr/local/include/opencv -L /usr/local/lib -lopencv_core -lopencv_highgui -lpthread -lrt
运行上面的命令之前,要将 opencv2 这个目录复制到 opencv下,这俩个目录都在 /usr/local/include/ 下。
g++ `pkg-config opencv --cflags --libs opencv` -o DisplayImage DisplayImage.cpp -I /usr/local/include/opencv -L /usr/local/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_gpu -lopencv_ts -lopencv_video -lopencv_objdetect -lopencv_ml -lpthread
我用这个OK的~
arm-linux-g++ -o opencv_test.o test.c -I /usr/local/include/opencv -L /usr/local/lib -lopencv_core -lopencv_highgui -lpthread -lrt
运行上面的命令之前,要将 opencv2 这个目录复制到 opencv下,这俩个目录都在 /usr/local/include/ 下。
g++ `pkg-config opencv --cflags --libs opencv` -o DisplayImage DisplayImage.cpp -I /usr/local/include/opencv -L /usr/local/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_gpu -lopencv_ts -lopencv_video -lopencv_objdetect -lopencv_ml -lpthread
我用这个OK的~
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询