I have a struct declared that contains a union. When I compile CUDA normally, everything works, however when building in EMU mode, I get error C2622 which is:
member '__cuda_emu:: … ’ of union '__cuda_emu:: … ’ has assignment operator
(the ‘…’ is the mangled name of the the variables).
I suspect that the EMU build is doing a C++ build (which would automatically create assignment operators for the union-ed structs while the regular build is a C one, but am not sure. I have my versions and the command strings I use below. I can’t quite figure out how to fix this though, anyone can help? THANKS!
Visual Studio 2005
“(CUDA_BIN_PATH)\nvcc.exe" -Xptxas â€“v -ccbin "(VCInstallDir)bin” -c -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/O2,/Zi,/MT -I"(CUDA_INC_PATH)" -I./ -I./CUDAcommon/inc -use_fast_math -o (ConfigurationName)$(InputName).obj $(InputFileName)
“(CUDA_BIN_PATH)\nvcc.exe" -ccbin "(VCInstallDir)bin” -deviceemu -c -D_CONSOLE -D_MBCS -Xcompiler “/EHsc,/W3,/nologo,/O2,/Zi,/MTd” -I"(CUDA_INC_PATH)" -I./ -I./CUDAcommon/inc -use_fast_math -o (