Link error for cuFuncSetCacheConfig/cuCtxSetCacheConfig

Hello All:

I have compile program with cuFuncSetCacheConfig/cuCtxSetCacheConfig, but I got link error, which library should I link ?

Compile Option:
nvcc transpose.cu -arch sm_20

OS : CentOS 5.5

nvcc --version:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2010 NVIDIA Corporation
Built on Wed_Nov__3_16:16:57_PDT_2010
Cuda compilation tools, release 3.2, V0.2.1221

Error Message:
/tmp/tmpxft_0000093b_00000000-13_transpose.o: In function main': tmpxft_0000093b_00000000-1_transpose.cudafe1.cpp:(.text+0x2508): undefined reference to cuCtxSetCacheConfig’
collect2: ld returned 1 exit status

You need to explicitly link libcuda, that is a driver API function, not runtime API function. Add -lcuda and see what happens.