Getting Linking Error while using OVX library APIs

I am writing a sample application using some of the OpenVX APIs.I am using CMake based build environment.
Following are the contents of my CMake configuration file.

project(VisionWorks_Practise)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(VISIONWORKS_INCLUDE_DIR “/usr/include” “/usr/include/VX” “/usr/share/visionworks/sources/nvxio/include”)
set(COMMON_LIB_DIR “/usr/lib”)
set(VISIONWORKS_LIB_DIR “/usr/share/visionworks/sources/libs/x86_64/linux/release”)
set(VISIONWORKS_LIB_FILES “/usr/share/visionworks/sources/libs/x86_64/linux/release/libovx.a”
“/usr/share/visionworks/sources/libs/x86_64/linux/release/libnvx.a”)

INCLUDE_DIRECTORIES(${VISIONWORKS_INCLUDE_DIR})
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
LINK_DIRECTORIES(${COMMON_LIB_DIR})
LINK_DIRECTORIES(${VISIONWORKS_LIB_DIR})
LINK_LIBRARIES(${VISIONWORKS_LIB_FILES})

I am getting undefined reference error. Some of the errors are given below.

main.cpp:(.text+0x46): undefined reference to vxDirective' main.cpp:(.text+0x58): undefined reference to vxCreateGraph’
main.cpp:(.text+0x78): undefined reference to `vxGetStatus’

What could be the reason?

Hi,

Do you want to run VisionWorks in the DRIVE PX2?
If yes, please update the library path based on the DRIVE platform:

set(VISIONWORKS_LIB_DIR "/usr/share/visionworks/sources/libs/<b>x86_64</b>/linux/release")
set(VISIONWORKS_LIB_FILES "/usr/share/visionworks/sources/libs/<b>x86_64</b>/linux/release/libovx.a"
"/usr/share/visionworks/sources/libs/<b>x86_64</b>/linux/release/libnvx.a")

Thanks.

I want to run on Desktop first.

Hi,

As mentioned in the topic 1048244, VisionWorks doesn’t support DRIVE PX2:
[url]https://devtalk.nvidia.com/default/topic/1048244/general/visionworks-cross-compilation-on-ubuntu-linux-host-system/[/url]

Sorry for any inconvenience.
Thanks.