Visionworks1.6 NVXIO cmake setup error

I am compiling the sample [Stabilizer with VisionWorks Graph Mode] which source code in the doc[ VisionWorks Toolkit Reference #### November 01, 2017 | 1.6 Release].

Question 1:demo source code package import error,in version 1.6,there is no NVXIO ,but the cmake also use it,is it a typo?

Blockquote
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(vstab_demo)
set(CMAKE_CXX_FLAGS “{CMAKE_CXX_FLAGS} -std=c++11") find_package(OpenCV REQUIRED core imgproc video highgui calib3d gpu) find_package(VisionWorks REQUIRED) find_package(VisionWorks-NVXIO REQUIRED) include_directories("{OpenCV_INCLUDE_DIRS}”)
include_directories("{VisionWorks_INCLUDE_DIRS}") include_directories("{VisionWorks-NVXIO_INCLUDE_DIRS}")
add_executable( vstab_demo main.cpp
homography_smoother_node.cpp homography_smoother_node.hpp
graph_mode_stabilizer.cpp graph_mode_stabilizer.hpp
)
target_link_libraries(vstab_demo
{OpenCV_LIBS} {VisionWorks_LIBRARIES}
${VisionWorks-NVXIO_LIBRARIES}
)

Question2:I use the cmake script to import libnvx.a file,but there is a error,how to fix it ?

include_directories (
{VisionWorks_INCLUDE_DIRS}" "{OpenCV_INCLUDE_DIRS}”
/root/VisionWorks-1.6-Samples/nvxio/include
)
#include_directories ("${OpenCV_INCLUDE_DIRS}")
#include_directories (/root/VisionWorks-1.6-Samples/nvxio/include)
link_directories (/root/VisionWorks-1.6-Samples/libs/x86_64/linux/release)

#include_directories("${VisionWorks-NVXIO_INCLUDE_DIRS}")

add_executable (
InMax_Visionworks
main.cpp
homography_smoother_node.cpp
graph_mode_stabilizer.cpp
)
target_link_libraries (
InMax_Visionworks
{OpenCV_LIBS} {VisionWorks_LIBRARIES}
libnvx.a
libovx.a
)

====================[ Build | InMax_Visionworks | Debug-u16VPI_docker ]=========
/usr/bin/cmake --build /tmp/tmp.CfXJJI8d64/src/graph/cmake-build-debug-u16vpi_docker --target InMax_Visionworks – -j 3
[ 25%] Linking CXX executable InMax_Visionworks
/usr/bin/ld: /root/VisionWorks-1.6-Samples/libs/x86_64/linux/release/libovx.a(FrameSource.o): undefined reference to symbol ‘cudaFree@@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/InMax_Visionworks.dir/build.make:162: recipe for target ‘InMax_Visionworks’ failed
make[3]: *** [InMax_Visionworks] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/InMax_Visionworks.dir/all’ failed
make[2]: *** [CMakeFiles/InMax_Visionworks.dir/all] Error 2
CMakeFiles/Makefile2:79: recipe for target ‘CMakeFiles/InMax_Visionworks.dir/rule’ failed
make[1]: *** [CMakeFiles/InMax_Visionworks.dir/rule] Error 2
Makefile:118: recipe for target ‘InMax_Visionworks’ failed
make: *** [InMax_Visionworks] Error 2

hi leef918:
what JP version you installed?
I test with JectPack4.4 on NX, just compile the visionworks sample source code ,all is OK

Could you please build this sample with cmake ?

ANY one can answer this?
Or Nvidia visionworks got many bug in it ?
Thanks?

hi leef918:
donot use that CMakefiles, try this way:
copy code to visionworks sample DIR, and copy Makefile from any samples DIR. then modify Makefile to fit this code. like my screen-shot,all of your compile error will be fixed. from my side finally ,compile is passed

1 Like