I have recently reinstall a Jetson TX2 platform with a help full instruction from JetsonHacks Youtube “JetPack 3.0 - NVIDIA Jetson TX2” it work fine.
Now I struggle to try complile on Jetson TX2 platform a small OpenCV C++ example use CUDA. I could not find a example of C++ code with a proper CMakeLists.txt
I have done a unsuccessful example how work to do cmake, make and complie
But when I start the program I got this error:
OpenCV Error: No CUDA support (The library is compiled without CUDA support) in throw_no_cuda, file /home/nvidia/build-opencv/opencv/modules/core/include/opencv2/core/private.cuda.hpp, line 107
terminate called after throwing an instance of ‘cv::Exception’
what(): /home/nvidia/build-opencv/opencv/modules/core/include/opencv2/core/private.cuda.hpp:107: error: (-216) The library is compiled without CUDA support in function throw_no_cuda
My CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
find_package(OpenCV REQUIRED)
set(WITH_CUDA ON)
project(project_name)
include_directories(${OpenCV_INCLUDE_DIRS})
add_executable(project_name main.cpp)
target_link_libraries(project_name ${OpenCV_LIBS})
When I do cmake I go this warning:
CMake Warning (dev) at /usr/share/OpenCV/OpenCVModules.cmake:47 (add_library):
ADD_LIBRARY called with SHARED option but the target platform does not
support dynamic linking. Building a STATIC library instead. This may lead
to problems.
Call Stack (most recent call first):
/usr/share/OpenCV/OpenCVConfig.cmake:112 (include)
CMakeLists.txt:2 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
…
My c++ code:
see attached file
Do I need to do any more installation on the Jetson TX2 to success with this
Is there any good tutorial regarding this issue ?
Also OpenCV4Tegra c++ and CMakeLists.txt and guide is intressting
Best Regards
Olle Welin
CMakeLists.txt (240 Bytes)
main.cpp (498 Bytes)