Open MargretWG opened 7 years ago
Sorry for the old post, but for anyone else that has this problem, per this comment by @tneumann, I did the following:
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS})
line, added in:ADD_LIBRARY(opencv_dep_cudart STATIC <an_empty_file.cpp>)
and then added in "opencv_dep_cudart" to the TARGET_LINK_LIBRARIES
sections underneath the ################################
like so:
TARGET_LINK_LIBRARIES(
compute_flow
${OPENCV_LIBRARIES}
${OpenCV_LIBS}
${Qt5Widgets_LIBRARIES}
opencv_dep_cudart
)
I try to run the code on Windows, but I get this error,
It suggests failed to open the input file "opencv_dep_cudart.lib"
I saw a solution to this problem on a forum, it was simply add set(CUDA_USE_STATIC_CUDA_RUNTIME OFF) to cmakelists.txt, but it didn't work . I guess this solution only works on the linux system. Could you please give me some suggestions? I have been working on the configuration for nearly 2 days.