Ask Your Question

Rok Mandeljc's profile - activity

2014-09-01 07:30:11 -0600 received badge  Teacher (source)
2014-08-30 11:12:18 -0600 answered a question Trying to fix 3.0 dev build with samples and CUDA

Can you check the contents of your samples/gpu folder and make sure there are no other files present whose name starts e.g. with "cascadeclassifier", other than "cascadeclassifier.cpp"?

The way targets for samples are built, first all .cpp files are listed, and their basenames are used for constructing executable's name (example_gpu_${sample}, where ${sample} is the basename). Then, the list of sources is obtained by globbing ${sample}.*, which means that the errors such as described above could be triggered by presence of, for example, cascadeclassifier.cpp.bak or some such.

As you mentioned, it might be possible to suppress those errors by adding

set_target_properties(${the_target} PROPERTIES LINKER_LANGUAGE CXX)

to OPENCV_DEFINE_CUDA_EXAMPLE() macro in samples/gpu/CMakeLists.txt (for example, after the add_executable()), but it will likely just result in errors during compilation due to invalid source files.