/usr/bin/ld: /usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(OpenGLBasicRenders.o): undefined reference to symbol ‘cudaGraphicsMapResources@@libcudart.so.10.2’
//usr/local/cuda/lib64/libcudart.so.10.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/main.dir/build.make:187: recipe for target ‘main’ failed
I realized that the link to the library is missing but I don’t know how to do it, this is my CMakeList.txt
I have inserted in the cmake the following instruction taken from the link you reported to me.
find_package(CUDA)
the error has changed:
New Error
nvidia@nvidia-desktop:~/Desktop/render/build$ make -B
Scanning dependencies of target main
[ 50%] Building CXX object CMakeFiles/main.dir/src/main.cpp.o
[100%] Linking CXX executable main
/usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(OpenGLBasicRenders.o): In function `nvidiaio::TextRender::~TextRender()':
OpenGLBasicRenders.cpp:(.text+0x7a5c): undefined reference to `FT_Done_Face'
OpenGLBasicRenders.cpp:(.text+0x7a64): undefined reference to `FT_Done_FreeType'
/usr/share/visionworks/sources/libs/aarch64/linux/release/libovx.a(OpenGLBasicRenders.o): In function `nvidiaio::TextRender::init(std::shared_ptr<nvidiaio::GLFunctions>)':
OpenGLBasicRenders.cpp:(.text+0xc334): undefined reference to `FT_Init_FreeType'
OpenGLBasicRenders.cpp:(.text+0xc3bc): undefined reference to `FT_New_Face'
OpenGLBasicRenders.cpp:(.text+0xc3d0): undefined reference to `FT_Set_Pixel_Sizes'
OpenGLBasicRenders.cpp:(.text+0xc52c): undefined reference to `FT_Load_Char'
OpenGLBasicRenders.cpp:(.text+0xc6d8): undefined reference to `FT_Load_Char'
/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:160: 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
This is my actual CMakeList.txt: CMakeLists.txt (678 Bytes)
I need to solve this problem or else I can’t reuse the VisionWorks codes.
Thanks