Build error in CUDA example (Bug #3335)
Description
I have been building from the OpenCV dev version on Git for quite some time (I do a git pull about once per week) and I ran into a build error. I even tried building from scratch and I get the same problem. Seems that there is some linking out of order here in the build system. If I compile without the examples on, I don't receive any errors.
Linking CXX executable ../../bin/gpu-example-cascadeclassifier_nvidia_api
/bin/ld: CMakeFiles/example_gpu_cascadeclassifier_nvidia_api.dir/cascadeclassifier_nvidia_api.cpp.o: undefined reference to symbol 'cudaGetDevice'
/bin/ld: note: 'cudaGetDevice' is defined in DSO /usr/local/cuda/lib64/libcudart.so.5.5 so try adding it to the linker command line
/usr/local/cuda/lib64/libcudart.so.5.5: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make2: * [bin/gpu-example-cascadeclassifier_nvidia_api] Error 1
make1: [samples/gpu/CMakeFiles/example_gpu_cascadeclassifier_nvidia_api.dir/all] Error 2
make: ** [all] Error 2
Associated revisions
Merge pull request #3335 from ilya-lavrenov:neon_ios
History
Updated by Roman Donchenko over 11 years ago
Reassigning to Vlad; although I suggest you wait until https://github.com/Itseez/opencv/pull/1664 is merged, I think that fixes it.
- Assignee changed from Roman Donchenko to Vladislav Vinogradov
Updated by Dmitry Retinskiy over 11 years ago
This issue should be already resolved by now (at least I had encountered the same problem last week and it worked ok with the fix).
- Status changed from New to Done
- Assignee deleted (
Vladislav Vinogradov) - Pull request set to https://github.com/Itseez/opencv/pull/1664