Code will not compile in EmuDebug/EmuRelease Code will not compile for emulation

I have a problem where code I have compiling and working fine in Debug/Release for CUDA will not compile successfully for EmuDebug/EmuRelease. This is code I am adapting to use CUDA. I know that down the road on this project this will be a big problem because I will need the debug capability.

The errors I get when compiling in EmuDebug/EmuRelease are:

1>C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iosfwd(652) : error C2039: ‘__SO__Si’ : is not a member of ‘std’

1>C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iosfwd(652) : error C2146: syntax error : missing ‘;’ before identifier ‘_ZSt8__SO__Si’

1>C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iosfwd(652) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\iosfwd(652) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

For normal debug compilation the Custom Build command line I am using is:

[font=“Courier”]

(CUDA_BIN_PATH)\nvcc.exe" -ccbin "(VCInstallDir)bin” -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MTd -I"(CUDA_INC_PATH)" -I./ -I../../common/inc -o (ConfigurationName)$(InputName).obj $(InputFileName)[/font]

For EmuDebug:

[font=“Courier”]"(CUDA_BIN_PATH)\nvcc.exe" -ccbin "(VCInstallDir)bin" -deviceemu -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MTd -I"(CUDA_INC_PATH)" -I./ -I../../common/inc -o (ConfigurationName)$(InputName).obj $(InputFileName)[/font]

I tried searching the forum for related issues, but no one has seemed to run into a similar problem. Since the only command line option that is different is “-deviceemu” I suspect it is an issue with CUDA emulation?

One thing I noticed is that in the Debug build output I get a warning message that may be related:

[font=“Courier”]1>C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\fstream(573) : warning C4355: ‘this’ : used in base member initializer list

1> C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\fstream(573) : while compiling class template member function ‘std::basic_ifstream<_Elem,_Traits>::basic_ifstream(void)’

1> with

1> [

1> _Elem=char,

1> _Traits=std::char_traits

1> ]

1> SetupDelay.cu(38) : see reference to class template instantiation ‘std::basic_ifstream<_Elem,_Traits>’ being compiled

1> with

1> [

1> _Elem=char,

1> _Traits=std::char_traits

1> ][/font]

The location of this warning is in the fstream.h file. I am not sure if this is related to the errors above.

The code at line 38 in SetupDelay.cu is:

   if(!finput.eof()) {

Can input files not be used in device emulation? I don’t see anything in the CUDA Programming Guide that states this is not allowed.

Any ideas? Thanks.

VS8 is not supported in Cuda 2.0.

I just downloaded CUDA 2.0 (I was using the BETA previously) and for one reason or another the same exact configuration now compiles successfully.