<div dir="ltr"><p dir="ltr">Hi Yang, <br>
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.<br>
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.<br>
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.</p><p>Attached in zip archive. :: My current CBCTrecon -> <a href="https://github.com/agravgaard/cbctrecon.git">https://github.com/agravgaard/cbctrecon.git</a> </p><p>I have since changed the source to use the newest git version of RTK (keeping the OpenCL code in my own <a href="https://github.com/agravgaard/RTK.git">fork</a>), but I don't think that made any difference in the linking. </p><p dir="ltr">Best regards<br>
Andreas</p>
<div class="gmail_extra"><br><div class="gmail_quote">On 16 Aug 2016 6:04 am, "Yang K Park" <<a href="mailto:theday79@gmail.com" target="_blank">theday79@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">Hi<span style="color:black"> </span>all,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">I used to use RTK r1.03 without any problem.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">However, today I adapted rtkfdk to my own code and ran into the following compile error messages..<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9pt;font-family:DotumChe;color:rgb(30,30,30);background:white">1>rtkcuda.lib(cuda_compile_gen<wbr>erated_rtkCudaFFTRampImageFilt<wbr>er.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@@YAXAEB<wbr>Uint3@@AEBUint2@@PEAMPEAUfloat<wbr>2@@@Z)<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9pt;font-family:DotumChe;color:rgb(30,30,30);background:white">1>rtkcuda.lib(cuda_compile_gen<wbr>erated_rtkCudaFFTRampImageFilt<wbr>er.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@@YAXAEB<wbr>Uint3@@AEBUint2@@PEAMPEAUfloat<wbr>2@@@Z)<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9pt;font-family:DotumChe;color:rgb(30,30,30);background:white">1>rtkcuda.lib(cuda_compile_gen<wbr>erated_rtkCudaFFTRampImageFilt<wbr>er.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@@YAXAEB<wbr>Uint3@@AEBUint2@@PEAMPEAUfloat<wbr>2@@@Z)<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9pt;font-family:DotumChe;color:rgb(30,30,30);background:white">1>rtkcuda.lib(cuda_compile_gen<wbr>erated_rtkCudaFFTRampImageFilt<wbr>er.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@@YAXAEB<wbr>Uint3@@AEBUint2@@PEAMPEAUfloat<wbr>2@@@Z)<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9pt;font-family:DotumChe;color:rgb(30,30,30);background:white">1>rtkcuda.lib(cuda_compile_gen<wbr>erated_rtkCudaFFTRampImageFilt<wbr>er.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@@YAXAEB<wbr>Uint3@@AEBUint2@@PEAMPEAUfloat<wbr>2@@@Z)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9pt;font-family:DotumChe;color:rgb(30,30,30);background:white">1>rtkcuda.lib(cuda_compile_gen<wbr>erated_rtkCudaFFTRampImageFilt<wbr>er.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@@YAXAEB<wbr>Uint3@@AEBUint2@@PEAMPEAUfloat<wbr>2@@@Z)</span><span style="font-family:Calibri,sans-serif"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">I found that this error was caused by the following line in my code:<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">#if</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Consolas;color:rgb(111,0,138);background:white">CUDA_FOUND</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:yellow">        </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:yellow">feldkamp</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:yellow"> = </span><span style="font-size:9.5pt;font-family:Consolas;color:rgb(33,111,133);background:yellow">FDKCUDAType</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:yellow">::</span><span style="font-size:9.5pt;font-family:Consolas;color:rgb(136,0,0);background:yellow">New</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:yellow">();</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> </span><span style="font-size:9.5pt;font-family:Wingdings;color:black;background:white">ß</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> here!<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">        </span><span style="font-size:9.5pt;font-family:Consolas;color:rgb(111,0,138);background:white">SET_FELDKAMP_OPTIONS</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">(</span><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">static_ca<wbr>st</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span style="font-size:9.5pt;font-family:Consolas;color:rgb(33,111,133);background:white">FDKCUDAType</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">*>(</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">feldkamp</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">.</span><span style="font-size:9.5pt;font-family:Consolas;color:rgb(136,0,0);background:white">GetP<wbr>ointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">()));<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white">#else</span><span style="font-family:Calibri,sans-serif"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">..<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">I also found that those problematic symbols (cufftPlan2d, cufftPlan3d, cufftExecR2C, ..) are defined in “cufft.h”.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif"><u></u> <u></u></span></p><div><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">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.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">Maybe I did something wrong but have no idea now.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">Any helps/suggestions will be highly appreciated!<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">Regards,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Calibri,sans-serif">Yang<span style="color:black"> <u></u><u></u></span></span></p></div></div></div><br>______________________________<wbr>_________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/rtk-users</a><br>
<br></blockquote></div></div>
</div>