missing library with VS2013


I am trying to install CUDA to another computer with VS 2013. After installing CUDA 7.5 I had some problems with VS.

I tried nvcc on VS command terminal and received,

LNK1104: cannot open file ‘uuid.lib’

Clearly this is due to missing library linking. So i manually copied uuid.lib, then I received missing Kernel32.lib error. After copying this lib file to project directory everything works fine.

I checked another computer with VS 2013 and CUDA 7.5 for environment variables, path links…etc . But i could not find what is missing.

Could you help what configuration is needed so i can run it not only on terminal but also VS environment.

I will appreciate if you promt as

Do this -> Do that -> …

In other forums, answer to similar problems are either outdated or inconsisntent.

Thanks in advance…

It sounds like the environment variable WindowsSdkDir is either missing or set incorrectly. On my Windows system it points at C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A, and the two libraries you mention can be found below that directory.


thank you for the reply.

The thing is i check other computer which does not have a problem with CUDA compilation and Run, does not have a such env. variable either. (I checked it from System properties -> environment variables…)

I cannot get the problem…

My best guess is that one of your machines has a broken (incomplete, damaged) installation of MSVS or the Windows Platform SDK. You should never have to copy individual Microsoft-provided library files between machines in the manner you described, that is a sure indication something is wrong in the setup. One thought: Are you using MSVS Express Edition by any chance?


Just to clearify one point. I copied uuid.lib and Kernel32.lib from the same computer by searching their location. Not copied from another computer.

I uninstalled and reinstalled VS 2013, reinstalled CUDA but still nothing changed.

Its VS2013 premium.

I manually created WindowsSdkDir env variable (system variables for windows) it did not make any change…

Let me rephrase then: You should never have to copy individual Microsoft-provided library files between two directories on the same machine in the manner you described, that is a sure indication something is wrong in the setup.

I am not sure what else to try at this point. You could try manually running the batch file that sets up the MSVS environment variables

vcvarsall.bat amd64

but it seems doubtful this has anything to do with your issue.


I copied the files to see if it will solve it and there is no other problem…

vcvarsall.bat amd64

did not make change…

I uninstalled and reinstalled everything, installations seems fine… but still the same…

Like i said, these files reside in the computer, but for some lack of configuration, it cannot make the linking…

This is what happens when i try to compile default CUDA project in VS2013

1>------ Build started: Project: cuda_sil, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(355,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry. TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.
1> Compiling CUDA source file kernel.cu…
1> c:\Users\muratm\documents\visual studio 2013\Projects\cuda_sil\cuda_sil>“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\nvcc.exe” -gencode=arch=compute_20,code=“sm_20,compute_20” --use-local-env --cl-version 2013 -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin” -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include" -G --keep-dir Debug -maxrregcount=0 --machine 32 --compile -cudart static -g -D"WIN32" -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd " -o Debug\kernel.cu.obj “c:\Users\muratm\documents\visual studio 2013\Projects\cuda_sil\cuda_sil\kernel.cu”
1> kernel.cu
1>LINK : fatal error LNK1104: cannot open file ‘kernel32.lib’
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

The windows installation guide is the best resource for step-by-step install instructions.


These steps are scrutinized…However, reason of this error cannot be resolved…

what happens if you load a sample project, e.g. deviceQuery, and compile it. (this is one of the steps in the installation guide). Does it compile successfully?


9th entry describes the received error on VS , 1st entry describes the received error on VS terminal when nvcc used…

The 9th entry does not describe what happens when you build the deviceQuery CUDA sample project.

Note that the compilation log in #9 contains a warning that WindowsSDKDir isn’t set (correctly), which is something I already suspected in #2. You might want to fix this first.

Well thats the point…

ı could not find solution for that. Solutions are either outdated or inconsistent…could not solve this problem anyway…

Any solution is welcome…

Pointing out the error is not a solution btw.

I am having trouble understanding where you are stuck. An environment variable is not correctly set. I gave an example how it should be set in #2. Corrective action you need to take: Set that environment variable on your machine.

Do you know how to set an environment variable under Windows? You can use the SET command of the command line processor. If you want to set it permanently, you can use Control Panel -> System and Security -> System, Advanced System Settings, Environment Variables


As the 3rd post states, reference computer (PC with VS 2013 and CUDA, and works perfectly fine) does not have such environemnt variable either. I checked all variables and there seems all variables match. If you are using CUDA on Win machine i believe you can verify that.

Manually creating such variable does not help also…

I could solve the problem… reinstalling SDK solved it…