Hi,
I’m trying to compile a simple example of VisionWorks but using cmake.
My CMakeLists.txt file is the following:
cmake_minimum_required(VERSION 3.10)
set the project name and version
project(render)find_package(OpenCV REQUIRED)
find_package(VisionWorks REQUIRED)
find_package(CUDA 10.2 REQUIRED)set(WITH_CUDA ON)
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(${VisionWorks_INCLUDE_DIRS})add_executable(main main_video_stabilizer.cpp)
target_include_directories(main PUBLIC
/usr/share/visionworks/sources/nvxio/include
${CUDA_INCLUDE_DIRS})target_link_libraries(main
-L/usr/share/visionworks/sources/libs/aarch64/linux/release
-lnvx
-lovx
-lglfw
${VisionWorks_LIBRARIES}
${OpenCV_LIBS}
${CUDA_LIBRARIES}
/usr/share/visionworks/sources/3rdparty/freetype/libs/libfreetype.a
-lgstpbutils-1.0
-lgstaudio-1.0
-lgstvideo-1.0
-lgstapp-1.0
-lgstbase-1.0
-lgstreamer-1.0
-lgobject-2.0
-lglib-2.0
-lGL
-lGLESv2)
The result is a link problem:
/usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerEGLStreamSinkFrameSourceImpl.o): In function
nvidiaio::GStreamerEGLStreamSinkFrameSourceImpl::InitializeEglCudaConsumer()': GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x868): undefined reference to
cuEGLStreamConsumerConnect’
/usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerEGLStreamSinkFrameSourceImpl.o): In functionnvidiaio::GStreamerEGLStreamSinkFrameSourceImpl::FinalizeEglCudaConsumer()': GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0xd88): undefined reference to
cuEGLStreamConsumerDisconnect’
/usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerEGLStreamSinkFrameSourceImpl.o): In functionnvidiaio::GStreamerEGLStreamSinkFrameSourceImpl::FinalizeGstPipeLine()': GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0xf20): undefined reference to
cuEGLStreamConsumerAcquireFrame’
GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0xf30): undefined reference tocuEGLStreamConsumerReleaseFrame' /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerEGLStreamSinkFrameSourceImpl.o): In function
nvidiaio::GStreamerEGLStreamSinkFrameSourceImpl::close()‘:
GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x1014): undefined reference tocuEGLStreamConsumerDisconnect' /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerEGLStreamSinkFrameSourceImpl.o): In function
nvidiaio::GStreamerEGLStreamSinkFrameSourceImpl::open()’:
GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x1148): undefined reference tocuEGLStreamConsumerDisconnect' GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x11e8): undefined reference to
cuEGLStreamConsumerConnect’
/usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerEGLStreamSinkFrameSourceImpl.o): In functionnvidiaio::GStreamerEGLStreamSinkFrameSourceImpl::fetch(nvidiaio::image_t const&, unsigned int)': GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x1408): undefined reference to
cuEGLStreamConsumerDisconnect’
GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x14ec): undefined reference tocuEGLStreamConsumerDisconnect' GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x154c): undefined reference to
cuEGLStreamConsumerAcquireFrame’
GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x15c0): undefined reference tocuEGLStreamConsumerDisconnect' GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x1618): undefined reference to
cuGraphicsResourceGetMappedEglFrame’
GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x1750): undefined reference tocuEGLStreamConsumerReleaseFrame' GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x17d4): undefined reference to
cuEGLStreamConsumerReleaseFrame’
GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x1834): undefined reference tocuEGLStreamConsumerDisconnect' /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerEGLStreamSinkFrameSourceImpl.o): In function
nvidiaio::GStreamerEGLStreamSinkFrameSourceImpl::~GStreamerEGLStreamSinkFrameSourceImpl()‘:
GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x2680): undefined reference tocuEGLStreamConsumerDisconnect' /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerEGLStreamSinkFrameSourceImpl.o): In function
nvidiaio::GStreamerEGLStreamSinkFrameSourceImpl::~GStreamerEGLStreamSinkFrameSourceImpl()’:
GStreamerEGLStreamSinkFrameSourceImpl.cpp:(.text+0x27a0): undefined reference tocuEGLStreamConsumerDisconnect' /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(EGLAPIAccessors.o): In function
nvidiaio::EGLDisplayAccessor::~EGLDisplayAccessor()‘:
EGLAPIAccessors.cpp:(.text+0x1c): undefined reference toeglTerminate' /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(EGLAPIAccessors.o): In function
nvidiaio::EGLDisplayAccessor::getInstance()’:
EGLAPIAccessors.cpp:(.text+0xbc): undefined reference toeglGetDisplay' EGLAPIAccessors.cpp:(.text+0xd4): undefined reference to
eglInitialize’
EGLAPIAccessors.cpp:(.text+0x128): undefined reference toeglTerminate' /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(EGLAPIAccessors.o): In function
nvidiaio::EGLDisplayAccessor::EGLDisplayAccessor()‘:
EGLAPIAccessors.cpp:(.text+0x190): undefined reference toeglGetDisplay' EGLAPIAccessors.cpp:(.text+0x1a4): undefined reference to
eglInitialize’
EGLAPIAccessors.cpp:(.text+0x1ec): undefined reference toeglTerminate' /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(EGLAPIAccessors.o): In function
nvidiaio::egl_api::setupEGLExtensions()‘:
EGLAPIAccessors.cpp:(.text+0x25c): undefined reference toeglGetProcAddress' CMakeFiles/main.dir/main_video_stabilizer.cpp.o: In function
main’:
main_video_stabilizer.cpp:(.text+0xdfc): undefined reference tonvx::initDelayOfImages(_vx_context*, _vx_delay*)' main_video_stabilizer.cpp:(.text+0x1050): undefined reference to
nvx::VideoStabilizer::VideoStabilizerParams::VideoStabilizerParams()’
main_video_stabilizer.cpp:(.text+0x1080): undefined reference to `nvx::VideoStabilizer::createImageBasedVStab(_vx_context*, nvx::VideoStabilizer::VideoStabilizerParams const&)’
collect2: error: ld returned 1 exit status
CMakeFiles/main.dir/build.make:121: recipe for target ‘main’ failed
make[2]: *** [main] Error 1
CMakeFiles/Makefile2:94: recipe for target ‘CMakeFiles/main.dir/all’ failed
make[1]: *** [CMakeFiles/main.dir/all] Error 2
Makefile:102: recipe for target ‘all’ failed
make: *** [all] Error 2
I have also tried with the cmakeLists that appears in the following post:
Does anyone know where the problem is?
Thanks in advance