请教nvtx库用法

想在程序中添加标记,用nsight分析。
按照guide中说的做下面两步:

5.1 C++ Project In order to compile your project with NVTX support in Visual Studio, use the following steps to setup your project accordingly:
[list=1]
Open the project properties dialog. Navigate to Configuration Properties > C/C++ > General.
Add the following path to the Additional Include Directories: $(NVTOOLSEXT_PATH)\include Navigate to Configuration Properties > Linker > General.
Add the following path to the Additional Library Directories: $(NVTOOLSEXT_PATH)\lib$(Platform) []Navigate to Configuration Properties > Linker > Input.
Add nvToolsExt32_1.lib or nvToolsExt64_1.lib (according to your system specifications), to the Additional Dependencies.
[/list]
5.2 CUDA (.cu file)In case you use NVTX to annotate code in .cu files, please also make sure the following configuration is setup (this is in addition to the steps discussed in the previous section):
[list=1]
Open the project properties dialog. [
]Navigate to Configuration Properties > CUDA C/C++ > Common.
Add the following path to the Additional Include Directories: $(NVTOOLSEXT_PATH)\include
[/list]
5.3 Copying NVTX to Project(这一步说的比较含糊,没太看懂,我是把nvToolsExt64_1.lib 拷贝到运行目录下)

然后源文件中加入:
头文件:
#include <nvToolsExt.h>

代码中加入:
nvtxRangePushA(“lean_a”);
nvtxRangePop();

编译通过,运行时出现:
1>myCuda1.cu.obj : error LNK2019: 无法解析的外部符号 __imp__nvtxRangePop@0,该符号在函数 _main 中被引用
1>myCuda1.cu.obj : error LNK2019: 无法解析的外部符号 __imp__nvtxRangePushA@4,该符号在函数 _main 中被引用
1>G:\APP_CUDA\BK\ADD_BK\Debug\ADD.exe : fatal error LNK1120: 2 个无法解析的外部命令

好像只有运行函数才出错,像如下声明语句,可以正常运行。说明系统已经识别这些关键字了,但是到运行函数的地方,就出错。
nvtxEventAttributes_t eventAttrib1 = {0};

问题解决:
把nvtx的头文件h,库文件lib,动态链接库文件dll全拷贝到代码目录和dubug目录,可以正常运行了。