Compiling CUDA examples gives build error

后端 未结 3 1798
悲哀的现实
悲哀的现实 2021-01-18 21:11

I am running Windows 7 64bit, with Visual Studio 2008. I installed the CUDA drivers and SDK. The SDK comes with quite a few examples including compiled executables and sour

相关标签:
3条回答
  • 2021-01-18 21:44

    You're focusing on the wrong error message.

    The .obj file doesn't exist because the nvcc compile step failed.

    nvcc fatal   : Visual Studio configuration file '(null)' could not be found for installation at 'c:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin/../..'
    
    0 讨论(0)
  • 2021-01-18 21:49

    You need to make sure that all the tools match. So if you have the 64-bit Visual Studio compiler installed then you should install the 64-bit version of the CUDA toolkit.

    If you only have the 32-bit Visual Studio compiler, then you should be able to install the 32-bit CUDA toolkit. Ideally you would install all the 64-bit tools. Then you will be able to build both the 64-bit and 32-bit (cross-compile) examples.

    0 讨论(0)
  • 2021-01-18 21:57

    Check if you have x64 compiler installed. Then change project type to x64. I had the same problem when trying to compile 32bit cuda program with 64bit win7.

    Also make sure you have added 64bit libs and includes to the search path.

    0 讨论(0)
提交回复
热议问题