undefined reference to `NvVideoEncoder::createVideoEncoder(char const*, int)'

Hello!
I try cross-compile app at my x86_64 host, but I have small problem

../gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-g++ ...
/tmp/ccQkQ5pd.o: In function `Encoder::Encoder(std::shared_ptr<EncoderConfig>, unsigned int)':
encoder.cpp:(.text+0x1e0): undefined reference to `NvVideoEncoder::createVideoEncoder(char const*, int)'
........

I download follow files from https://developer.nvidia.com/embedded/downloads#?tx=$product,jetson_nano

$ ls ~/Downloads/
gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
Jetson-210_Linux_R32.2.0_aarch64.tbz2
public_sources.tbz2
Tegra_Linux_Sample-Root-Filesystem_R32.2.0_aarch64.tbz2
Tegra_Multimedia_API_R32.2.0_aarch64.tbz2
ubuntu_bionic-l4t_aarch64_src.tbz2

Where can I found target libraries?
Thank you and excuse my bad english.

Hi,
Cross-compiling tegra_multimedia_api samples is not supported. Please install the samples via sdkmanager.

Hello, DaneLLL!
I don’t build tegra_multimedia_api at my host, I develop application based at NVidia API, this is application should capture stream from CMOS sensor, encode it to H264/H265 and provide encoded data via RTP/RTSP, so I try build my application.

Hi,
The codes are open source and you can install them through sdkmanager

/usr/src/tegra_multimedia_api/samples/common/classes/

You have to build NvVideoEncoder.cpp with your application. NvVideoEncoder.cpp is also dependent to other files. You may refer to Makefiles in the package.

Hello, DaneLLL!
Unfortunately at this moment I havn’t access to board, so I work at my x86_64 host and tegra_multimedia_api from Tegra_Multimedia_API_R32.2.0_aarch64.tbz2 contained only h-files in include/

Ok, I think I can try copy libraries from board

/usr/lib/aarch64-linux-gnu/tegra/libnvrm.so
/usr/lib/aarch64-linux-gnu/tegra/libnvscf.so
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_utils.so
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_contentpipe.so
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-glvkspirv.so.32.1.0
/usr/lib/aarch64-linux-gnu/tegra/libnvcamlog.so
/usr/lib/aarch64-linux-gnu/tegra/libnvddk_2d_v2.so
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_graphics.so
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-tls.so.32.1.0
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-ptxjitcompiler.so.32.1.0
/usr/lib/aarch64-linux-gnu/tegra/libnvexif.so
/usr/lib/aarch64-linux-gnu/tegra/libnvphsd.so
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_boot.so
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-glcore.so.32.1.0
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_spincircle.so
/usr/lib/aarch64-linux-gnu/tegra/libnvbuf_utils.so.1.0.0
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_image.so
/usr/lib/aarch64-linux-gnu/tegra/libnvddk_vic.so
/usr/lib/aarch64-linux-gnu/tegra/libnvos.so
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite_video.so
/usr/lib/aarch64-linux-gnu/tegra/libnvfnetstoredefog.so
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_il.so
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-ptxjitcompiler.so.1
/usr/lib/aarch64-linux-gnu/tegra/libnvtx_helper.so
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_parser.so
/usr/lib/aarch64-linux-gnu/tegra/libnvcolorutil.so
/usr/lib/aarch64-linux-gnu/tegra/libnvosd.so
/usr/lib/aarch64-linux-gnu/tegra/libnvrm_graphics.so
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_force.so
/usr/lib/aarch64-linux-gnu/tegra/libnvargus_socketserver.so
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-fatbinaryloader.so.32.1.0
/usr/lib/aarch64-linux-gnu/tegra/libnvparser.so
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-eglcore.so.32.1.0
/usr/lib/aarch64-linux-gnu/tegra/libnvmmlite.so
/usr/lib/aarch64-linux-gnu/tegra/libnvrm_gpu.so
/usr/lib/aarch64-linux-gnu/tegra/libnvtvmr.so
/usr/lib/aarch64-linux-gnu/tegra/libnvodm_imager.so
/usr/lib/aarch64-linux-gnu/tegra/libnvcamerautils.so
/usr/lib/aarch64-linux-gnu/tegra/libnvwinsys.so
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-egl-wayland.so.1
/usr/lib/aarch64-linux-gnu/tegra/libnvfnet.so
/usr/lib/aarch64-linux-gnu/tegra/libnvtestresults.so
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_generic.so
/usr/lib/aarch64-linux-gnu/tegra/libnvomxilclient.so
/usr/lib/aarch64-linux-gnu/tegra/libnvdc.so
/usr/lib/aarch64-linux-gnu/tegra/libnvid_mapper.so.1.0.0
/usr/lib/aarch64-linux-gnu/tegra/libnvmm.so
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_camera.so
/usr/lib/aarch64-linux-gnu/tegra/libnvmm_utils.so
/usr/lib/aarch64-linux-gnu/tegra/libnveglstream_camconsumer.so
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_ui.so
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_gpucompute.so
/usr/lib/aarch64-linux-gnu/tegra/libnveventlib.so
/usr/lib/aarch64-linux-gnu/tegra/libnveglstreamproducer.so
/usr/lib/aarch64-linux-gnu/tegra/libnvargus_socketclient.so
/usr/lib/aarch64-linux-gnu/tegra/libnvavp.so
/usr/lib/aarch64-linux-gnu/tegra/libnvcamv4l2.so
/usr/lib/aarch64-linux-gnu/tegra/libnvargus.so
/usr/lib/aarch64-linux-gnu/tegra/libnvphs.so
/usr/lib/aarch64-linux-gnu/tegra/libnvcameratools.so
/usr/lib/aarch64-linux-gnu/tegra/libnvll.so
/usr/lib/aarch64-linux-gnu/tegra/libnvfnetstorehdfx.so
/usr/lib/aarch64-linux-gnu/tegra/libnvimp.so
/usr/lib/aarch64-linux-gnu/tegra/libnvomx.so
/usr/lib/aarch64-linux-gnu/tegra/libnvmedia.so
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-rmapi-tegra.so.32.1.0
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-glsi.so.32.1.0
/usr/lib/aarch64-linux-gnu/tegra/libnvcam_imageencoder.so
/usr/lib/aarch64-linux-gnu/tegra/libnvgov_tbc.so
/usr/lib/aarch64-linux-gnu/tegra/libnvtnr.so
/usr/lib/aarch64-linux-gnu/tegra/libnvtracebuf.so
/usr/lib/aarch64-linux-gnu/tegra/libnvidia-egl-wayland.so
/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so
/usr/lib/aarch64-linux-gnu/tegra/libnvbuf_utils.so
/usr/lib/aarch64-linux-gnu/tegra/libnvapputil.so
/usr/lib/aarch64-linux-gnu/tegra/libnvid_mapper.so

But will be a great if it will be available at server as archive or the best variant if it will be available as sources additional to blobs.

Hi,
We suggest users use sdkmanager. If you have to customize the system, please refer to the default system and do integration.

Hello, DaneLLL!
So I must always compile at board and any develop without access to board don’t possible?
This is doesn’t very user-friendly.

Ok, I add additional files from tegra_multimedia_api/samples/common/classes, thank you DaneLLL, unfortunately I have new problem

In file included from ../tegra_multimedia_api/include/EGL/egl.h:39:0,
                 from ../tegra_multimedia_api/include/nvbuf_utils.h:33,
                 from ../tegra_multimedia_api/samples/common/classes/NvV4l2ElementPlane.cpp:37:
../tegra_multimedia_api/include/EGL/eglplatform.h:136:10: fatal error: X11/Xlib.h: No such file or directory
 #include <X11/Xlib.h>
          ^~~~~~~~~~~~

I can’t build and run application at board without X11 ?

Hi,
You have to install libx11-dev. Also need to install libdrm-dev, libv4l-dev.
However, you may then hit error like:
https://devtalk.nvidia.com/default/topic/1036467/jetson-tx2/why-i-cann-t-cross-compile-the-samples-of-tegra_multimedia_api_r28-2-0_aarch64-tbz2-successfully-/post/5265329/#5265329

We use sdkmanager to handle dependencies. Still suggest you install sdk components through sdkmanager.