Can’t find library file for cudaEGL.h

I have a gstreamer pipeline and now struggling with Image proccessing using GPU.
I want to use EGLImage involved class so I included directory /usr/local/cuda-10.0/targets/aarch64-linux/include I found which has cudaEGL.h to my CMakeLists.txt
and #include <cudaEGL.h> to my main.cpp
but I couldn’t find any library files… so I got errors like

main.cpp:188: undefined reference to cuGraphicsEGLRegisterImage' main.cpp:195: undefined reference to cuGraphicsResourceGetMappedEglFrame’
main.cpp:196: undefined reference to cuCtxSynchronize' main.cpp:205: undefined reference to cuCtxSynchronize’
main.cpp:206: undefined reference to `cuGraphicsUnregisterResource’

please help, thank you.

You need

-L/usr/local/cuda-10.0/lib64/ -lcudart

Please refer to the build command in

I’ve had this reply(the file) earlier, and compiled well without any issue, but it doesn’t work having this problem…

gst_cv_gpumat$ ./gst_cv_gpumat Using launch string: nvarguscamerasrc name=mysource ! video/x-raw(memory:NVMM),width=1920,height=1080,framerate=30/1,format=NV12 ! nvvidconv name=myconv ! video/x-raw(memory:NVMM),format=RGBA ! nvoverlaysink
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
Segmentation fault (core dumped)

anyway I got some hints from your reply and added cudart to my cmakelists, it compiled, thank you very much!!

but when it runs causes this error.

cmake-build-debug$ ./yolo
Source Pipeline state changed from NULL to READY.
Source Pipeline state changed from READY to PAUSED.
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
Framerate set to : 33 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
H264: Profile = 66, Level = 40
reference in DPB was never decoded
terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(4.2.0) /home/vcanus/opencv_contrib-4.2.0/modules/cudafilters/src/cuda/row_filter.hpp:172: error: (-217:Gpu API call) unspecified launch failure in function ‘caller’

Aborted (core dumped)

I used to build two pipes, appsink pipe and appsrc pipe. and put image processing between them,
but changed it to one pipe and manipulted pipeline with gst_pad_probe (like the example you attached).
My pipeline is like below

  gchar *appsink_desc = g_strdup(
             "uridecodebin uri=rtsp://~ ! "
 #ifdef JETSON
             "nvvidconv name=myconv ! video/x-raw(memory:NVMM), format=(string)NV12 ! "                     
             "omxh264enc ! "
             "mpegtsmux ! "
             "hlssink max-files=8 target-duration=5 location=../chunk/segment%05d.ts playlist-location=../chunk/playlist.m3u8"

Thank you,

It looks like the camera source is not a Bayer sensor. If your source is a Bayer sensor and uses ISP engine, nvarguscamerasrc is valid and gst_cv_gpumat sample should work fine.

In your app, you may use nvv4l2h264enc and try default OpenCV4.1.1. We are deprecating omx plugins. And looks like you upgrade to upse OpenCV4.2.

Thanks, I changed nvv4l2h264enc instead of omxh264enc.
How about installing CUDA toolkit 10.2 if it’s possible?
Does it support OpenCV4.2?


You need to upgrade to r32.4.2 to have CUDA10.2, and it is OpenCV4.1.1.
Have you confirmed your app works with OpenCV4.1.1?

Not yet but anyway I can’t use 4.2ver,
will install OpenCV4.1.1 from your link above soon. Thanks.