开发者

cutil function compilation program

I am using some of the functions from cutil.h to time my code. It compiles fine on windows xp with vs 2008. Recently, I s开发者_JAVA百科witch to window 7 and vs 2008. The same code doesn't compile and I have following error,

1>LINK : C:\Users\weiqi\Documents\Visual Studio 2008\Projects\corrColumnLateral\Debug\corrColumnLateral.exe not found or not built by the last incremental link; performing full link1>corrColumnLateral.cu.obj : error LNK2019: unresolved external symbol _imp_cutStopTimer@4 referenced in function _main1>corrColumnLateral.cu.obj : error LNK2019: unresolved external symbol _imp_cutStartTimer@4 referenced in function _main1>corrColumnLateral.cu.obj : error LNK2019: unresolved external symbol _imp_cutResetTimer@4 referenced in function _main1>corrColumnLateral.cu.obj : error LNK2019: unresolved external symbol _imp_cutGetTimerValue@4 referenced in function _main1>corrColumnLateral.cu.obj : error LNK2019: unresolved external symbol _imp_cutCreateTimer@4 referenced in function _main

The macros from the header file, such as CUDA_SAFE_CALL, work fine, but timing functions like cutCreatTimer fail to compile. Does anyone knows what is going on?


IF you right click your cu source file and select properties:

Then go to CUDA C/C++ and under Common add the location of the cutil.h to the Additional Include Directories folder.

For me this was: C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\common\inc


You need to link to the cutil library. On linux it's called libcutil.so or libcutil.a. The windows version probably also has "cutil" in its name, so you can search for that file and add it to your linker options.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜