VisionWorks Render make Error Compile

I followed the instructions and took the CMakeList.txt from this Topic, I only added the OpenCV library and Cuda, this below is the CMakeList.txt with this modification

cmake_minimum_required(VERSION 3.10)

#set the project name and version
project(stereoDepth)

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 ./src/main.cpp ./src/stereo_match_graph.hpp ./src/stereo_match_graph.cpp)

target_include_directories(main PRIVATE /usr/share/visionworks/sources/nvxio/include)

target_link_libraries(main -L/usr/share/visionworks/sources/libs/aarch64/linux/release -lnvx -lovx -lglfw -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 {VisionWorks_LIBRARIES} **{OpenCV_LIBS} ${CUDA_LIBRARIES}**)

when I try to create the Render as below:

std::unique_ptr<ovxio::Render> renderer(ovxio::createDefaultRender(context,"Stereo Matching", width, height));

I get this error when I make the project:

> [ 25%] Building CXX object CMakeFiles/main.dir/src/main.cpp.o
> [ 50%] Building CXX object CMakeFiles/main.dir/src/stereo_correspondence.cpp.o
> [ 75%] Building CXX object CMakeFiles/main.dir/src/stereo_match_graph.cpp.o
> [100%] Linking CXX executable main
> /usr/bin/ld: /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(OpenGLBasicRenders.o): undefined reference to symbol 'FT_Done_FreeType'
> //usr/lib/aarch64-linux-gnu/libfreetype.so.6: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> CMakeFiles/main.dir/build.make:212: recipe for target 'main' failed
> make[2]: *** [main] Error 1
> CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed
> make[1]: *** [CMakeFiles/main.dir/all] Error 2
> Makefile:83: recipe for target 'all' failed
> make: *** [all] Error 2

Please note that if I try to run the stereo_matching demo in the VisionWorks folder after I compile it, it will run without errors.

Thank you in advance for your help.

Hi,

If you use OVX library, please add it into the CMakeLists.txt as well.
The library path is located at

/usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a
/usr/share/visionworks/sources/libs/aarch64/linux/release/libnvx.a

Thanks

Hi,
I added the libraries but it returns the same error as before.
This is my CMakeList.txt:
CMakeLists.txt (1.1 KB)

[EDIT]

I also tried to add this library
-L/usr/share/visionworks/sources/3rdparty/freetype/libs -lfreetype

and it gives me this other error:

Error
> [ 25%] Building CXX object CMakeFiles/main.dir/src/main.cpp.o
> [ 50%] Building CXX object CMakeFiles/main.dir/src/stereo_correspondence.cpp.o
> [ 75%] Building CXX object CMakeFiles/main.dir/src/stereo_match_graph.cpp.o
> [100%] Linking CXX executable main
> /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerImagesRenderImpl.o): In function `nvidiaio::GStreamerImagesRenderImpl::InitializeGStreamerPipeline()':
> GStreamerImagesRenderImpl.cpp:(.text+0x3dc): undefined reference to `gst_app_src_set_caps'
> /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerVideoRenderImpl.o): In function `nvidiaio::GStreamerVideoRenderImpl::InitializeGStreamerPipeline()':
> GStreamerVideoRenderImpl.cpp:(.text+0x390): undefined reference to `gst_app_src_set_caps'
> /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerBaseRenderImpl.o): In function `nvidiaio::GStreamerBaseRenderImpl::FinalizeGStreamerPipeline()':
> GStreamerBaseRenderImpl.cpp:(.text+0x158): undefined reference to `gst_app_src_end_of_stream'
> /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerBaseRenderImpl.o): In function `nvidiaio::GStreamerBaseRenderImpl::flush()':
> GStreamerBaseRenderImpl.cpp:(.text+0x468): undefined reference to `gst_app_src_push_buffer'
> /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerBaseRenderImpl.o): In function `nvidiaio::GStreamerBaseRenderImpl::close()':
> GStreamerBaseRenderImpl.cpp:(.text+0x82c): undefined reference to `gst_app_src_end_of_stream'
> /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerBaseRenderImpl.o): In function `nvidiaio::GStreamerBaseRenderImpl::~GStreamerBaseRenderImpl()':
> GStreamerBaseRenderImpl.cpp:(.text+0x9a8): undefined reference to `gst_app_src_end_of_stream'
> /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(GStreamerBaseRenderImpl.o): In function `nvidiaio::GStreamerBaseRenderImpl::~GStreamerBaseRenderImpl()':
> GStreamerBaseRenderImpl.cpp:(.text+0xb20): undefined reference to `gst_app_src_end_of_stream'
> /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(OpenGL.o): In function `nvidiaio::loadGLFunctions(nvidiaio::GLFunctions*)':
> OpenGL.cpp:(.text+0x4): undefined reference to `glActiveTexture'
> OpenGL.cpp:(.text+0x8): undefined reference to `glBindBuffer'
> OpenGL.cpp:(.text+0xc): undefined reference to `glBindVertexArray'
> OpenGL.cpp:(.text+0x10): undefined reference to `glBufferData'
> OpenGL.cpp:(.text+0x14): undefined reference to `glClear'
> OpenGL.cpp:(.text+0x18): undefined reference to `glCreateProgram'
> OpenGL.cpp:(.text+0x1c): undefined reference to `glDeleteBuffers'
> OpenGL.cpp:(.text+0x20): undefined reference to `glDeleteShader'
> OpenGL.cpp:(.text+0x28): undefined reference to `glActiveTexture'
> OpenGL.cpp:(.text+0x2c): undefined reference to `glBindBuffer'
> OpenGL.cpp:(.text+0x30): undefined reference to `glClearColor'
> OpenGL.cpp:(.text+0x34): undefined reference to `glBindVertexArray'
> OpenGL.cpp:(.text+0x38): undefined reference to `glCompileShader'
> OpenGL.cpp:(.text+0x3c): undefined reference to `glBufferData'
> OpenGL.cpp:(.text+0x40): undefined reference to `glCreateShader'
> OpenGL.cpp:(.text+0x44): undefined reference to `glClear'
> OpenGL.cpp:(.text+0x48): undefined reference to `glDeleteProgram'
> OpenGL.cpp:(.text+0x4c): undefined reference to `glCreateProgram'
> OpenGL.cpp:(.text+0x50): undefined reference to `glDeleteVertexArrays'
> OpenGL.cpp:(.text+0x54): undefined reference to `glDeleteBuffers'
> OpenGL.cpp:(.text+0x58): undefined reference to `glAttachShader'
> OpenGL.cpp:(.text+0x5c): undefined reference to `glDeleteShader'
> OpenGL.cpp:(.text+0x60): undefined reference to `glBindTexture'
> OpenGL.cpp:(.text+0x64): undefined reference to `glBlendFunc'
> OpenGL.cpp:(.text+0x68): undefined reference to `glDeleteTextures'
> OpenGL.cpp:(.text+0x88): undefined reference to `glClearColor'
> OpenGL.cpp:(.text+0x8c): undefined reference to `glCompileShader'
> OpenGL.cpp:(.text+0x94): undefined reference to `glCreateShader'
> OpenGL.cpp:(.text+0x98): undefined reference to `glDisable'
> OpenGL.cpp:(.text+0x9c): undefined reference to `glDeleteProgram'
> OpenGL.cpp:(.text+0xa0): undefined reference to `glDepthFunc'
> OpenGL.cpp:(.text+0xa4): undefined reference to `glDeleteVertexArrays'
> OpenGL.cpp:(.text+0xa8): undefined reference to `glDrawArrays'
> OpenGL.cpp:(.text+0xac): undefined reference to `glAttachShader'
> OpenGL.cpp:(.text+0xb4): undefined reference to `glBindTexture'
> OpenGL.cpp:(.text+0xbc): undefined reference to `glBlendFunc'
> OpenGL.cpp:(.text+0xc4): undefined reference to `glDeleteTextures'
> OpenGL.cpp:(.text+0xcc): undefined reference to `glDisable'
> OpenGL.cpp:(.text+0xe0): undefined reference to `glDepthFunc'
> OpenGL.cpp:(.text+0xe4): undefined reference to `glDrawArrays'
> OpenGL.cpp:(.text+0xec): undefined reference to `glDisableVertexAttribArray'
> OpenGL.cpp:(.text+0xf4): undefined reference to `glEnable'
> OpenGL.cpp:(.text+0xf8): undefined reference to `glDrawElements'
> OpenGL.cpp:(.text+0xfc): undefined reference to `glDisableVertexAttribArray'
> OpenGL.cpp:(.text+0x100): undefined reference to `glGenVertexArrays'
> OpenGL.cpp:(.text+0x104): undefined reference to `glGenBuffers'
> OpenGL.cpp:(.text+0x108): undefined reference to `glGetError'
> OpenGL.cpp:(.text+0x10c): undefined reference to `glGetProgramiv'
> OpenGL.cpp:(.text+0x110): undefined reference to `glGetShaderiv'
> OpenGL.cpp:(.text+0x114): undefined reference to `glIsTexture'
> OpenGL.cpp:(.text+0x124): undefined reference to `glLinkProgram'
> OpenGL.cpp:(.text+0x130): undefined reference to `glDrawElements'
> OpenGL.cpp:(.text+0x138): undefined reference to `glGetProgramInfoLog'
> OpenGL.cpp:(.text+0x13c): undefined reference to `glGetShaderInfoLog'
> OpenGL.cpp:(.text+0x144): undefined reference to `glIsBuffer'
> OpenGL.cpp:(.text+0x148): undefined reference to `glIsVertexArray'
> OpenGL.cpp:(.text+0x150): undefined reference to `glShaderSource'
> OpenGL.cpp:(.text+0x154): undefined reference to `glEnableVertexAttribArray'
> OpenGL.cpp:(.text+0x15c): undefined reference to `glGenTextures'
> OpenGL.cpp:(.text+0x160): undefined reference to `glGetAttribLocation'
> OpenGL.cpp:(.text+0x16c): undefined reference to `glMapBufferRange'
> OpenGL.cpp:(.text+0x174): undefined reference to `glTexParameteri'
> OpenGL.cpp:(.text+0x178): undefined reference to `glEnable'
> OpenGL.cpp:(.text+0x17c): undefined reference to `glGenBuffers'
> OpenGL.cpp:(.text+0x180): undefined reference to `glTexImage2D'
> OpenGL.cpp:(.text+0x184): undefined reference to `glGenVertexArrays'
> OpenGL.cpp:(.text+0x188): undefined reference to `glGetError'
> OpenGL.cpp:(.text+0x190): undefined reference to `glGetProgramiv'
> OpenGL.cpp:(.text+0x198): undefined reference to `glGetShaderiv'
> OpenGL.cpp:(.text+0x1a0): undefined reference to `glIsTexture'
> OpenGL.cpp:(.text+0x1a8): undefined reference to `glLinkProgram'
> OpenGL.cpp:(.text+0x1b4): undefined reference to `glGetProgramInfoLog'
> OpenGL.cpp:(.text+0x1bc): undefined reference to `glGetShaderInfoLog'
> OpenGL.cpp:(.text+0x1c0): undefined reference to `glIsBuffer'
> OpenGL.cpp:(.text+0x1c8): undefined reference to `glIsVertexArray'
> OpenGL.cpp:(.text+0x1cc): undefined reference to `glTexParameterf'
> OpenGL.cpp:(.text+0x1d0): undefined reference to `glShaderSource'
> OpenGL.cpp:(.text+0x1d8): undefined reference to `glEnableVertexAttribArray'
> OpenGL.cpp:(.text+0x1e0): undefined reference to `glGenTextures'
> OpenGL.cpp:(.text+0x1e8): undefined reference to `glGetAttribLocation'
> OpenGL.cpp:(.text+0x1f0): undefined reference to `glMapBufferRange'
> OpenGL.cpp:(.text+0x1f8): undefined reference to `glTexParameteri'
> OpenGL.cpp:(.text+0x200): undefined reference to `glTexImage2D'
> OpenGL.cpp:(.text+0x210): undefined reference to `glTexParameterf'
> OpenGL.cpp:(.text+0x21c): undefined reference to `glTexSubImage2D'
> OpenGL.cpp:(.text+0x224): undefined reference to `glUniform1f'
> OpenGL.cpp:(.text+0x230): undefined reference to `glTexSubImage2D'
> OpenGL.cpp:(.text+0x234): undefined reference to `glUniform1f'
> OpenGL.cpp:(.text+0x238): undefined reference to `glUniform1i'
> OpenGL.cpp:(.text+0x23c): undefined reference to `glUnmapBuffer'
> OpenGL.cpp:(.text+0x240): undefined reference to `glValidateProgram'
> OpenGL.cpp:(.text+0x244): undefined reference to `glReadPixels'
> OpenGL.cpp:(.text+0x248): undefined reference to `glIsShader'
> OpenGL.cpp:(.text+0x24c): undefined reference to `glGetFloatv'
> OpenGL.cpp:(.text+0x250): undefined reference to `glUniform4f'
> OpenGL.cpp:(.text+0x25c): undefined reference to `glDrawArraysInstanced'
> OpenGL.cpp:(.text+0x270): undefined reference to `glGetBooleanv'
> OpenGL.cpp:(.text+0x274): undefined reference to `glIsFramebuffer'
> OpenGL.cpp:(.text+0x27c): undefined reference to `glPixelStorei'
> OpenGL.cpp:(.text+0x280): undefined reference to `glIsProgram'
> OpenGL.cpp:(.text+0x288): undefined reference to `glLineWidth'
> OpenGL.cpp:(.text+0x28c): undefined reference to `glBufferSubData'
> OpenGL.cpp:(.text+0x294): undefined reference to `glBindFramebuffer'
> OpenGL.cpp:(.text+0x298): undefined reference to `glUniformMatrix4fv'
> OpenGL.cpp:(.text+0x2a0): undefined reference to `glUseProgram'
> OpenGL.cpp:(.text+0x2a4): undefined reference to `glVertexAttribPointer'
> OpenGL.cpp:(.text+0x2ac): undefined reference to `glVertexAttribDivisor'
> OpenGL.cpp:(.text+0x2b0): undefined reference to `glUniform1i'
> OpenGL.cpp:(.text+0x2b4): undefined reference to `glUnmapBuffer'
> OpenGL.cpp:(.text+0x2b8): undefined reference to `glValidateProgram'
> OpenGL.cpp:(.text+0x2bc): undefined reference to `glReadPixels'
> OpenGL.cpp:(.text+0x2c4): undefined reference to `glIsShader'
> OpenGL.cpp:(.text+0x2cc): undefined reference to `glGetFloatv'
> OpenGL.cpp:(.text+0x2d4): undefined reference to `glUniform4f'
> OpenGL.cpp:(.text+0x2dc): undefined reference to `glDrawArraysInstanced'
> OpenGL.cpp:(.text+0x2e4): undefined reference to `glGetBooleanv'
> OpenGL.cpp:(.text+0x2ec): undefined reference to `glIsFramebuffer'
> OpenGL.cpp:(.text+0x2f4): undefined reference to `glPixelStorei'
> OpenGL.cpp:(.text+0x2fc): undefined reference to `glIsProgram'
> OpenGL.cpp:(.text+0x300): undefined reference to `glDeleteFramebuffers'
> OpenGL.cpp:(.text+0x304): undefined reference to `glLineWidth'
> OpenGL.cpp:(.text+0x308): undefined reference to `glGenFramebuffers'
> OpenGL.cpp:(.text+0x30c): undefined reference to `glBufferSubData'
> OpenGL.cpp:(.text+0x314): undefined reference to `glBindFramebuffer'
> OpenGL.cpp:(.text+0x31c): undefined reference to `glUniformMatrix4fv'
> OpenGL.cpp:(.text+0x324): undefined reference to `glUseProgram'
> OpenGL.cpp:(.text+0x32c): undefined reference to `glVertexAttribPointer'
> OpenGL.cpp:(.text+0x330): undefined reference to `glBindBufferBase'
> OpenGL.cpp:(.text+0x334): undefined reference to `glVertexAttribDivisor'
> OpenGL.cpp:(.text+0x344): undefined reference to `glDeleteFramebuffers'
> OpenGL.cpp:(.text+0x350): undefined reference to `glFramebufferTexture2D'
> OpenGL.cpp:(.text+0x354): undefined reference to `glGenFramebuffers'
> OpenGL.cpp:(.text+0x368): undefined reference to `glFramebufferTexture2D'
> OpenGL.cpp:(.text+0x378): undefined reference to `glCheckFramebufferStatus'
> OpenGL.cpp:(.text+0x37c): undefined reference to `glUniform2f'
> OpenGL.cpp:(.text+0x380): undefined reference to `glMemoryBarrier'
> OpenGL.cpp:(.text+0x384): undefined reference to `glTexStorage2D'
> OpenGL.cpp:(.text+0x388): undefined reference to `glDeleteProgramPipelines'
> OpenGL.cpp:(.text+0x38c): undefined reference to `glUseProgramStages'
> OpenGL.cpp:(.text+0x390): undefined reference to `glProgramUniform1f'
> OpenGL.cpp:(.text+0x394): undefined reference to `glProgramUniform4f'
> OpenGL.cpp:(.text+0x3a0): undefined reference to `glViewport'
> OpenGL.cpp:(.text+0x3a8): undefined reference to `glDispatchCompute'
> OpenGL.cpp:(.text+0x3ac): undefined reference to `glBindImageTexture'
> OpenGL.cpp:(.text+0x3b4): undefined reference to `glUniform1ui'
> OpenGL.cpp:(.text+0x3b8): undefined reference to `glGenProgramPipelines'
> OpenGL.cpp:(.text+0x3c0): undefined reference to `glBindProgramPipeline'
> OpenGL.cpp:(.text+0x3c4): undefined reference to `glCreateShaderProgramv'
> OpenGL.cpp:(.text+0x3cc): undefined reference to `glProgramUniform2f'
> OpenGL.cpp:(.text+0x3d0): undefined reference to `glGetTexLevelParameteriv'
> OpenGL.cpp:(.text+0x3d8): undefined reference to `glGetIntegerv'
> OpenGL.cpp:(.text+0x3e4): undefined reference to `glCheckFramebufferStatus'
> OpenGL.cpp:(.text+0x3e8): undefined reference to `glUniform2f'
> OpenGL.cpp:(.text+0x3ec): undefined reference to `glBindBufferBase'
> OpenGL.cpp:(.text+0x3f0): undefined reference to `glMemoryBarrier'
> OpenGL.cpp:(.text+0x3f8): undefined reference to `glTexStorage2D'
> OpenGL.cpp:(.text+0x400): undefined reference to `glDeleteProgramPipelines'
> OpenGL.cpp:(.text+0x404): undefined reference to `glHint'
> OpenGL.cpp:(.text+0x408): undefined reference to `glUseProgramStages'
> OpenGL.cpp:(.text+0x410): undefined reference to `glProgramUniform1f'
> OpenGL.cpp:(.text+0x418): undefined reference to `glProgramUniform4f'
> OpenGL.cpp:(.text+0x420): undefined reference to `glViewport'
> OpenGL.cpp:(.text+0x438): undefined reference to `glDispatchCompute'
> OpenGL.cpp:(.text+0x444): undefined reference to `glGetIntegerv'
> OpenGL.cpp:(.text+0x448): undefined reference to `glBindImageTexture'
> OpenGL.cpp:(.text+0x450): undefined reference to `glUniform1ui'
> OpenGL.cpp:(.text+0x454): undefined reference to `glGenProgramPipelines'
> OpenGL.cpp:(.text+0x45c): undefined reference to `glBindProgramPipeline'
> OpenGL.cpp:(.text+0x464): undefined reference to `glCreateShaderProgramv'
> OpenGL.cpp:(.text+0x46c): undefined reference to `glProgramUniform2f'
> OpenGL.cpp:(.text+0x474): undefined reference to `glGetTexLevelParameteriv'
> OpenGL.cpp:(.text+0x47c): undefined reference to `glHint'
> collect2: error: ld returned 1 exit status
> CMakeFiles/main.dir/build.make:214: recipe for target 'main' failed
> make[2]: *** [main] Error 1
> CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/main.dir/all' failed
> make[1]: *** [CMakeFiles/main.dir/all] Error 2
> Makefile:83: recipe for target 'all' failed
> make: *** [all] Error 2

Thanks

news?

Hi,

We are checking this internally.
Will update more information with you later.

Thanks.

I have solved it, attached is the file I made, there was a library and a command to insert.

CMakeLists.txt (787 Bytes)

Good to know this.

Thanks for the sharing.