chenlvqing 发表于 2021-4-12 18:56:02

开发板调试阶段的两个问题

购买套餐:RK3399PRO-JD4豪华套餐
问题一:安装维基教程用Firefly_Ubuntu_18.04.5_LTS_DESKTOP_ext4_202012301242_PYTHON3.5-RKNN-OPENCV.img根文件系统镜像编译出来的统一固件不能烧写,
加载固件的时候提示【rootfs分区不够存放镜像】多次编译大小都是4.93G
问题二:烧写的系统固件是AIO-RK3399PRO-JD4-LVDS-UBUNTU18.04-GPT-20200525-1634.img
#include <iostream>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>

using namespace std;
using namespace cv;
int main()
{
      Mat testImage = imread("test.jpg");
      imshow("testImage",testImage);

      waitKey(0);
      return 0;
}

编译显示
/tmp/cco0yCku.o: In function `main':
opencv_test.cpp:(.text+0x40): undefined reference to `cv::imread(cv::String const&, int)'
opencv_test.cpp:(.text+0x70): undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
opencv_test.cpp:(.text+0x88): undefined reference to `cv::waitKey(int)'
/tmp/cco0yCku.o: In function `cv::String::String(char const*)':
opencv_test.cpp:(.text._ZN2cv6StringC2EPKc+0x40): undefined reference to `cv::String::allocate(unsigned long)'
/tmp/cco0yCku.o: In function `cv::String::~String()':
opencv_test.cpp:(.text._ZN2cv6StringD2Ev+0x10): undefined reference to `cv::String::deallocate()'
/tmp/cco0yCku.o: In function `cv::Mat::~Mat()':
opencv_test.cpp:(.text._ZN2cv3MatD2Ev+0x34): undefined reference to `cv::fastFree(void*)'
/tmp/cco0yCku.o: In function `cv::Mat::release()':
opencv_test.cpp:(.text._ZN2cv3Mat7releaseEv+0x58): undefined reference to `cv::Mat::deallocate()'
collect2: error: ld returned 1 exit status
系统中有opencv的相关头文件和库文件,但没有opencv.pc文件,请问需要如何配置是opencv生效



895816513 发表于 2021-4-14 09:52:05

回复问题一:
之前rootfs太大了,超出分区表限制,我现在提交了代码。你更新之后编译就没问题了。
更新方式:https://wiki.t-firefly.com/AIO-3399PRO-JD4/linux_compile_gpt.html

我用同样的方法编译和使用了Firefly_Ubuntu_18.04.5_LTS_DESKTOP_ext4_202012301242_PYTHON3.5-RKNN-OPENCV.img文件系统,制作出AIO-RK3399PRO-JD4-Ubuntu_18.04.5_LTS_DESKTOP_PYTHON3.5-RKNN-OPENCV-20210413-1746.img.7z

下载链接


回复问题二:
如果你不会部署opencv,使用Firefly_Ubuntu_18.04.5_LTS_DESKTOP_ext4_202012301242_PYTHON3.5-RKNN-OPENCV.img,或上网查询opencv部署和编译方式
页: [1]
查看完整版本: 开发板调试阶段的两个问题