Hi, thank you to the author for this library. I have successfully built the latest version of FLANN in VS2008 with the BUILD_CUDA_LIB flag on.
I first wrote a simple program to try NN search on the CPU. This worked great without any errors.
I then wanted to try flann::KDTreeCuda3dIndexParams. I defined the #define FLANN_USE_CUDA in my source file. I also specified flann_cuda_s.lib in my TARGET_LINK_LIBRARIES in my CMakeLists.txt file.
When I tried to compile, I get the following error:
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol __cudaUnregisterFatBinary referenced in function "void __cdecl __cudaUnregisterBinaryUtil(void)" (?__cudaUnregisterBinaryUtil@@yaxxz)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol cudaLaunch referenced in function "enum cudaError __cdecl cudaLaunch(char _)" (??$cudaLaunch@D@@ya?AW4cudaError@@pead@Z)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol cudaFuncGetAttributes referenced in function "enum cudaError __cdecl cudaFuncGetAttributes<void __cdecl(void)>(struct cudaFuncAttributes *,void (_cdecl)(void))" (??$cudaFuncGetAttributes@$$A6AXXZ@@ya?AW4cudaError@@PEAUcudaFuncAttributes@@P6AXXZ@Z)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol cudaGetErrorString referenced in function "public: virtual class std::basic_string<char,struct std::char_traits,class std::allocator > __cdecl thrust::system::detail::cuda_error_category::message(int)const " (?message@cuda_error_category@detail@system@thrust@@ueba?AV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@h@Z)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol cudaGetDeviceProperties referenced in function "void __cdecl thrust::detail::backend::cuda::arch::detail::get_device_properties(struct thrust::detail::backend::cuda::arch::device_properties_t &,int)" (?get_device_properties@detail@arch@cuda@backend@1thrust@@YAXAEAUdevice_properties_t@23415@H@Z)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol cudaGetDevice referenced in function "struct thrust::detail::backend::cuda::arch::device_properties_t __cdecl thrust::detail::backend::cuda::arch::device_properties(void)" (?device_properties@arch@cuda@backend@detail@thrust@@ya?AUdevice_properties_t@12345@XZ)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol cudaMemcpy referenced in function "void __cdecl thrust::detail::backend::cuda::detail::checked_cudaMemcpy(void *,void const *,unsigned __int64,enum cudaMemcpyKind)" (?checked_cudaMemcpy@detail@cuda@backend@1thrust@@YAXPEAXPEBX_KW4cudaMemcpyKind@@@z)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol cudaSetupArgument referenced in function "void __cdecl _device_stub__ZN5flann17KdTreeCudaPrivate13nearestKernelINS_4cuda15SingleResultSetIfEENS_6CudaL2EEEvPKNS2_22kd_tree_builder_detail9SplitInfoEPKiSB_PK6float4SE_SE_PKfiiPiPfiT_T0(struct flann::cuda::kd_tree_builder_detail::SplitInfo const *,int const *,int const *,struct float4 const *,struct float4 const *,struct float4 const *,float const *,int,int,int *,float *,int,struct flann::cuda::SingleResultSet &,struct flann::CudaL2 &)" (?_device_stub__ZN5flann17KdTreeCudaPrivate13nearestKernelINS_4cuda15SingleResultSetIfEENS_6CudaL2EEEvPKNS2_22kd_tree_builder_detail9SplitInfoEPKiSB_PK6float4SE_SE_PKfiiPiPfiT_T0@@YAXPEBUSplitInfo@kd_tree_builder_detail@cuda@flann@@PEBH1PEBUfloat4@@22PEBMHHPEAHPEAMHAEAU?$SingleResultSet@M@34@AEAUCudaL2@4@@z)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol cudaConfigureCall referenced in function "public: static void __cdecl thrust::detail::backend::cuda::detail::closure_launcher_base<struct thrust::detail::backend::cuda::unordered_reduce_closure<class thrust::detail::normal_iterator<class thrust::device_ptr >,__int64,int,class thrust::detail::normal_iterator<class thrust::device_ptr >,struct thrust::plus >,1>::launch<unsigned __int64,unsigned __int64,unsigned __int64>(struct thrust::detail::backend::cuda::unordered_reduce_closure<class thrust::detail::normal_iterator<class thrust::device_ptr >,__int64,int,class thrust::detail::normal_iterator<class thrust::device_ptr >,struct thrust::plus >,unsigned __int64,unsigned __int64,unsigned __int64)" (??$launch@_K_K_K@?$closure_launcher_base@U?$unordered_reduce_closure@V?$normal_iterator@V?$device_ptr@H@thrust@@@detail@thrust@@_JHV123@U?$plus@H@3@@cuda@backend@detail@thrust@@$00@detail@cuda@backend@1thrust@@saxu?$unordered_reduce_closure@V?$normal_iterator@V?$device_ptr@H@thrust@@@detail@thrust@@_JHV123@U?$plus@H@3@@2314@_K11@Z)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol cudaMalloc referenced in function "public: enum cudaError __cdecl thrust::detail::backend::cuda::detail::b40c_thrust::BaseRadixSortingEnactor<float,int>::EnactSort(struct thrust::detail::backend::cuda::detail::b40c_thrust::RadixSortStorage<float,int> &)" (?EnactSort@?$BaseRadixSortingEnactor@MH@b40c_thrust@detail@cuda@backend@3thrust@@qeaa?AW4cudaError@@aeau?$RadixSortStorage@MH@234536@@z)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol __cudaRegisterFunction referenced in function "void __cdecl __sti____cudaRegisterAll_55_tmpxft_00000c20_00000000_6_kdtree_cuda_3d_index_cpp1_ii_134f9e06(void)" (?__sti____cudaRegisterAll_55_tmpxft_00000c20_00000000_6_kdtree_cuda_3d_index_cpp1_ii_134f9e06@@yaxxz)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol __cudaRegisterFatBinary referenced in function "void __cdecl __sti____cudaRegisterAll_55_tmpxft_00000c20_00000000_6_kdtree_cuda_3d_index_cpp1_ii_134f9e06(void)" (?__sti____cudaRegisterAll_55_tmpxft_00000c20_00000000_6_kdtree_cuda_3d_index_cpp1_ii_134f9e06@@yaxxz)
1>flann_cuda_s.lib(flann_cuda_s_generated_kdtree_cuda_3d_index.cu.obj) : error LNK2019: unresolved external symbol cudaFree referenced in function "void __cdecl thrust::detail::backend::cuda::free<0>(class thrust::device_ptr)" (??$free@$0A@@cuda@backend@detail@thrust@@yaxv?$device_ptr@X@3@@z)
Can you let me know what might be the problem?
Thank you.