OpenCV2.4 build with GPU fails when building static library (Bug #1901)
Description
Summary:¶
Target ALL_BUILD fails with the following error repeated over and over:
opencv_core240d.lib(gpumat.obj) : error LNK2019: unresolved external symbol "void __cdecl cv::gpu::device::copyToWithMask_gpu(struct cv::gpu::DevMem2D_<unsigned char>,struct cv::gpu::DevMem2D_<unsigned char>,unsigned int,int,struct cv::gpu::DevMem2D_<unsigned char>,bool,struct CUstream_st *)" (?copyToWithMask_gpu@device@gpu@cv@@YAXU?$DevMem2D_@E@23@0IH0_NPAUCUstream_st@@@Z) referenced in function "void __cdecl cv::gpu::copyWithMask(class cv::gpu::GpuMat const &,class cv::gpu::GpuMat &,class cv::gpu::GpuMat const &,struct CUstream_st *)" (?copyWithMask@gpu@cv@@YAXABVGpuMat@12@AAV312@0PAUCUstream_st@@@Z)
Details¶
I followed the installation procedure videos( video1 , video2 ) except for the phyton and documentation related programs.
Got many warnings but no other errors.
Targets opencv_core
, opencv_gpu
and others are built correctly.
The before-mentioned error that got repeated in every subsequent build that depends on opencv_core240d.lib
.
I want to emphasize that I'm building a static version of the library, thus I unchecked "BUILD_SHARED_LIBS".
I'm attaching my Cmake output as it contains all related configuration.
I think it's a simple linker error, related with the fact that cuda_compile_generated_matrix_operations.cu.obj
was not linked in opencv_core240d.lib
.
but, as I know nothing about Cmake nor about compiling CUDA, I'm unable to fix it. Sorry guys :(
Platform configuration
SO: Windows XP Service Pack 3
IDE: Visual Studio 2010
For a more detailed configuration please see CmakeConfigureOutput.txt attached file.
I'm also attaching nvidia driver's version(cuda version).
PS: Half way through the compilation process a VS macro asked me to stop the compilation process as cmake has produced/modified .sln
files.
I agreed. That happened 2 or 3 times. I'm also attaching an image of it in case it wasn't expected behaviour.
Thank you all!
update: related to bug#1897
Related issues
duplicated by Bug #1897: Undefined symbols in libopencv_core.dylib on OSX (OpenCV ... | Cancelled | 2012-05-06 |
Associated revisions
Merge pull request #1901 from vpisarev:ocl_svm3
History
Updated by Miguel Visionary almost 13 years ago
Does not happen with r8315
Updated by Andrey Kamaev almost 13 years ago
- Category set to build/install
- Assignee set to Anatoly Baksheev
Updated by Miguel Visionary almost 13 years ago
Missing attached files.
- File opencv_core_Output.txt added
- File CmakeConfigureOutput.txt added
- File driversNVIDIA_CUDA.png added
- File Cmake_AutomaticallyReload.png added
Updated by Anatoly Baksheev almost 13 years ago
It is linked. Otherwise you would get more unresolved erros.
I can't reproduce this both on trunk and 2.4 branch. Could you try svn trunk again?
Sourceforge package will be updated with 2.4.1 release in the end of May.
Updated by Miguel Visionary almost 13 years ago
I cannot test it right now, I'm on another project. srry guys.
As stated, it did not happen with svn branch r8135 so we built that one :D. The only concern was that Qt interface buttons did not show any icon.
Anyway, as 2.4.1 will soon be released, IMHO, it's not worth it investing more time on it.
Thanks!
Updated by Anatoly Baksheev almost 13 years ago
- Status changed from Open to Done
Updated by Anatoly Baksheev almost 13 years ago
- Status changed from Done to Cancelled
Updated by Andrey Kamaev almost 13 years ago
- Target version set to 2.4.1