Hi,
I have installed three O.S. on a machine (x64 architecture): Windows XP SP2 32 bit, Windows XP SP2 x64, Windows Server 2008.
So, I have tried to install CUDA and to integrate it with VS8 (2005) SP1 in all the O.S. environments.
Here are my results:
WINDOWS XP 32 bit (SP2)
No problem. I have installed CUDA for XP 32 bit.
Everithing is OK with VS8 SP1.
WINDOWS XP x64 (SP2)
I have installed “CUDA for XP x64” (NVIDIA_CUDA_toolkit_2.0_win64.exe and NVIDIA_CUDA_SDK_2.02.0811.0240_win64.exe), together with the display driver 178.26 (for Quadro FX 4600 graphics card).
I have also successfully executed (and recompiled) several examples (in the folder NVIDIA CUDA SDK\projects) by using VS8.
However, when I try to compile a x64 project in Visual Studio 2005, containing both c++, c and .cu files, the result is:
nvcc fatal : nvcc cannot find a supported cl version. Only MSVC 7.1 and MSVC 8.0 are supported
I don’t know why the amd64/cl.exe is not recognized as a supported cl version, but if in VS8 “Tools->Options->Project and Solutions->VC++ Directories”, under “Platform: x64”
I substitute
$(VCInstallDir)bin\amd64
$(VCInstallDir)bin
with
$(VCInstallDir)bin
$(VCInstallDir)bin\amd64
then I am able to compile the .cu and .cxx files of the project.
However, when the compiler starts to compile the .c files, I have a lot of errors:
2>Compiling…
2>CUDA_renderSingleSlice.cu_generated.c
2>d:\cuda\include\host_config.h(89) : error C2061: syntax error : identifier ‘type_info’
2>d:\cuda\include\host_config.h(89) : error C2059: syntax error : ‘;’
2>D:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin/…\INCLUDE\vadefs.h(50) : error C2059: syntax error : ‘string’
…
The CUDA_renderSingleSlice.cu_generated.c code is:
#line 1 “CUDA_renderSingleSlice.cudafe1.cpp”
#line 1 “D:/cnr/VolumeRenderingCuda20-vs8-x64/CUDA_renderSingleSlice.cu”
#line 89 “d:\cuda\include\host_config.h”
class type_info;
#line 104 “d:\cuda\include\host_config.h”
#line 147 “D:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin/…\INCLUDE\crtdefs.h”
#pragma pack ( push, 8 )
#line 32 “D:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin/…\INCLUDE\vadefs.h”
#pragma pack ( push, 8 )
#line 50 “D:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin/…\INCLUDE\vadefs.h”
extern “C” { typedef unsigned __int64 uintptr_t; }
#line 61 “D:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin/…\INCLUDE\vadefs.h”
extern “C” { typedef char *va_list; }
#line 125 “D:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin/…\INCLUDE\vadefs.h”
extern “C” { extern void __cdecl __va_start(va_list *, …); }
#line 151 “D:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin/…\INCLUDE\vadefs.h”
#pragma pack ( pop )
#line 430 “D:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin/…\INCLUDE\crtdefs.h”
typedef unsigned __int64 size_t;
#line 1 “D:\CUDA\bin/…/include\crt/host_runtime.h”
The first error is in the host_config.h file:
#if !defined(HOST_CONFIG_H)
#define HOST_CONFIG_H
#if defined(CUDACC)
#if defined(APPLE)
#define __THROW
#elif defined(GNUC)
#include <features.h> /* for __THROW /
#include <bits/c++config.h> / get _GLIBCXX_ATOMIC_BUILTINS /
#if _GLIBCXX_ATOMIC_BUILTINS == 1
#undef _GLIBCXX_ATOMIC_BUILTINS / for missing __sync_fetch_and_add /
#endif / _GLIBCXX_ATOMIC_BUILTINS == 1 /
#elif defined(_WIN32)
#if _MSC_VER == 1400
#if !defined(_CRT_NONSTDC_NO_WARNINGS)
#define _CRT_NONSTDC_NO_WARNINGS / to suppress warnings /
#endif / _CRT_NONSTDC_NO_WARNINGS /
#if !defined(_CRT_SECURE_NO_WARNINGS)
#define _CRT_SECURE_NO_WARNINGS / to suppress warnings /
#endif / _CRT_SECURE_NO_WARNINGS /
#endif / _MSC_VER == 1400 /
#if !defined(NOMINMAX)
#define NOMINMAX / min and max are part of cuda runtime /
#endif / !NOMINMAX */
#define __THROW
→ class type_info; /* forward declaration */ ERROR!!!
#endif /* GNUC /
#endif / CUDACC /
#endif / !HOST_CONFIG_H */
That’s it.
WINDOWS SERVER 2008
I have installed “CUDA for Vista x64” (NVIDIA_CUDA_toolkit_2.0_win64.exe and NVIDIA_CUDA_SDK_2.02.0811.0240_win64.exe), together with the display driver 178.26 (for Quadro FX 4600 graphics card).
I obtain exactly the same errors of the XP x64 version.
I hope someone can help, or can share the same experience.