gpt4 book ai didi

c++ - Jetson TK1/OpenCV4Tegra 链接器错误

转载 作者:行者123 更新时间:2023-11-28 06:18:57 29 4
gpt4 key购买 nike

<分区>

我有一个程序可以在我的机器上正常编译/运行。我刚拿起一个 Nvidia Jetson TK1 来尝试在上面运行它。我刷到最新版本的 linux4tegra,按照说明安装了 cuda 和 opencv herehere .每当我尝试运行我的 make 文件时,我都会遇到链接器错误:

(.text+0x94): undefined reference to `cv::VideoCapture::VideoCapture(std::string const&)'
(.text+0xb2): undefined reference to `cv::VideoCapture::isOpened() const'
(.text+0xcc): undefined reference to `cv::VideoCapture::~VideoCapture()'
(.text+0x108): undefined reference to `cv::namedWindow(std::string const&, int)'
(.text+0x146): undefined reference to `vtable for cv::VideoCapture'
(.text+0x14a): undefined reference to `vtable for cv::VideoCapture'

我已经符号链接(symbolic link)了一些 cuda SO,但我不知道这些是从哪里来的。

我的 makefile 看起来像:

g++ `pkg-config --libs opencv` ...

包配置返回:

$ pkg-config --libs opencv
/usr/lib/libopencv_calib3d.so /usr/lib/libopencv_contrib.so /usr/lib/libopencv_core.so /usr/lib/libopencv_features2d.so /usr/lib/libopencv_flann.so /usr/lib/libopencv_gpu.so /usr/lib/libopencv_highgui.so /usr/lib/libopencv_imgproc.so /usr/lib/libopencv_legacy.so /usr/lib/libopencv_ml.so /usr/lib/libopencv_objdetect.so /usr/lib/libopencv_photo.so /usr/lib/libopencv_stitching.so /usr/lib/libopencv_superres.so /usr/lib/libopencv_ts.a /usr/lib/libopencv_video.so /usr/lib/libopencv_videostab.so /usr/lib/libopencv_esm_panorama.so /usr/lib/libopencv_facedetect.so /usr/lib/libopencv_imuvstab.so /usr/lib/libopencv_tegra.so /usr/lib/libopencv_vstab.so -lcufft -lnpps -lnppi -lnppc -lcudart -lrt -lpthread -lm -ldl

有什么想法吗?我最初的想法是 header /SO 不匹配,但由于这些都来自同一个包中的 nvidia,我认为这不太可能。

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com