Hi Andreas,
Thanks a lot for your help! Now I can recall what happened in my previous project. I should have linked “cufft.lib” manually in the CMakeLists file. Now it works fine. I believe this issue happens only in the old version of RTK and may have been fixed in the Nightly version. (I have been too lazy to move on to a newer version, though.) Thanks. Yang (To RTK staff: I’m sorry that I forgot to change the title even though this is a separate thread.) From: [email protected] [mailto:[email protected]] On Behalf Of Andreas Gravgaard Andersen Sent: Tuesday, August 16, 2016 4:21 AM To: Yang-Kyun Park <[email protected]> Cc: [email protected] Subject: Re: [Rtk-users] Geometric phantom example on wiki Hi Yang, I had a similar problem when I was compiling your CBCT reconstruction software - I thought it was due me having a different version of CUDA. I solved it by changing the cmakelists.txt to use a FindCuda_wrap.cmake and associated files (copied and slightly modified from the rtk one.) to let those files do the linking. I also changed the CMakelists.txt to make it compile on non-cuda hardware, so I'm not completely sure whether this might have been the solution to that. Attached in zip archive. :: My current CBCTrecon -> https://github.com/agravgaard/cbctrecon.git I have since changed the source to use the newest git version of RTK (keeping the OpenCL code in my own fork <https://github.com/agravgaard/RTK.git> ), but I don't think that made any difference in the linking. Best regards Andreas On 16 Aug 2016 6:04 am, "Yang K Park" <[email protected] <mailto:[email protected]> > wrote: Hi all, I used to use RTK r1.03 without any problem. However, today I adapted rtkfdk to my own code and ran into the following compile error messages.. 1>rtkcuda.lib(cuda_compile_generated_rtkCudaFFTRampImageFilter.cu.obj) : error LNK2019: unresolved external symbol cufftPlan2d referenced in function "void __cdecl CUDA_fft_convolution(struct int3 const &,struct int2 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@AEBUint2@@PEAMPEAUfloat2@@@Z) 1>rtkcuda.lib(cuda_compile_generated_rtkCudaFFTRampImageFilter.cu.obj) : error LNK2019: unresolved external symbol cufftPlan3d referenced in function "void __cdecl CUDA_fft_convolution(struct int3 const &,struct int2 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@AEBUint2@@PEAMPEAUfloat2@@@Z) 1>rtkcuda.lib(cuda_compile_generated_rtkCudaFFTRampImageFilter.cu.obj) : error LNK2019: unresolved external symbol cufftExecR2C referenced in function "void __cdecl CUDA_fft_convolution(struct int3 const &,struct int2 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@AEBUint2@@PEAMPEAUfloat2@@@Z) 1>rtkcuda.lib(cuda_compile_generated_rtkCudaFFTRampImageFilter.cu.obj) : error LNK2019: unresolved external symbol cufftExecC2R referenced in function "void __cdecl CUDA_fft_convolution(struct int3 const &,struct int2 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@AEBUint2@@PEAMPEAUfloat2@@@Z) 1>rtkcuda.lib(cuda_compile_generated_rtkCudaFFTRampImageFilter.cu.obj) : error LNK2019: unresolved external symbol cufftSetCompatibilityMode referenced in function "void __cdecl CUDA_fft_convolution(struct int3 const &,struct int2 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@AEBUint2@@PEAMPEAUfloat2@@@Z) 1>rtkcuda.lib(cuda_compile_generated_rtkCudaFFTRampImageFilter.cu.obj) : error LNK2019: unresolved external symbol cufftDestroy referenced in function "void __cdecl CUDA_fft_convolution(struct int3 const &,struct int2 const &,float *,struct float2 *)" (?CUDA_fft_convolution@@YAXAEBUint3@@AEBUint2@@PEAMPEAUfloat2@@@Z) I found that this error was caused by the following line in my code: #if CUDA_FOUND feldkamp = FDKCUDAType::New(); <-- here! SET_FELDKAMP_OPTIONS(static_cast<FDKCUDAType*>(feldkamp.GetPointer())); #else .. I also found that those problematic symbols (cufftPlan2d, cufftPlan3d, cufftExecR2C, ..) are defined in “cufft.h”. It is very weird to me because I did the exactly same thing in my previous project and there was no problem at that time. Maybe I did something wrong but have no idea now. Any helps/suggestions will be highly appreciated! Regards, Yang _______________________________________________ Rtk-users mailing list [email protected] <mailto:[email protected]> http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________ Rtk-users mailing list [email protected] http://public.kitware.com/mailman/listinfo/rtk-users
