all .cuh compile error visual studio 2010+cuda 5.5+cub-1.6.3 win32

72 views
Skip to first unread message

14154...@qq.com

unread,
Dec 21, 2016, 12:18:20 AM12/21/16
to cub-users
hi all,

I met complie errors in build cub example project - CUDA55_example_block_radix_sort.

Errors may be caused by the template. It seems that the compile can not recognize the template define! 

So what to do with this .cuh?

1>e:\cub-1.6.3\cub\util_type.cuh(656): error C2059: syntax error : ')'
1>e:\cub-1.6.3\cub\util_type.cuh(656): error C2143: syntax error : missing ',' before ')'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(141): error C2065: 'OffsetT' : undeclared identifier
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(141): error C2065: 'T' : undeclared identifier
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(142): error C2065: 'OffsetT' : undeclared identifier
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(142): error C2065: 'T' : undeclared identifier
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(152): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(158): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(163): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(165): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(166): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(172): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(175): error C2947: expecting '>' to terminate template-argument-list, found '>'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(175): error C2065: 'T' : undeclared identifier
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(176): error C2144: syntax error : 'int' should be preceded by ')'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(176): error C2065: 'T' : undeclared identifier
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(177): error C2065: 'T' : undeclared identifier
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(179): error C2143: syntax error : missing '>' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(179): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(183): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(184): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(186): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(187): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(194): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(199): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(201): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(202): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(209): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(220): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(226): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(227): error C2065: 'a' : undeclared identifier
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(228): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(229): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(249): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(255): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(258): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(265): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(268): error C2065: 'second' : undeclared identifier
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(268): error C2228: left of '.value' must have class/struct/union
1>          type is ''unknown-type''
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(268): error C2143: syntax error : missing ',' before ')'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(272): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(273): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(278): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(284): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(287): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(294): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(297): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(298): error C2065: 'retval' : undeclared identifier
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(298): error C2228: left of '.value' must have class/struct/union
1>          type is ''unknown-type''
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(298): error C2143: syntax error : missing ',' before ')'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(298): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(301): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(302): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\thread\../thread/thread_operators.cuh(313): error C2143: syntax error : missing ';' before '}'
1>e:\cub-1.6.3\cub\block\../thread/thread_reduce.cuh(43): error C2143: syntax error : missing ';' before '{'
1>e:\cub-1.6.3\cub\block\../thread/thread_reduce.cuh(59): error C2947: expecting '>' to terminate template-argument-list, found '>'
1>e:\cub-1.6.3\cub\block\../thread/thread_reduce.cuh(59): error C2975: 'cub::KeyValuePair' : invalid template argument for 'KeyIsLT', expected compile-time constant expression
1>          e:\cub-1.6.3\cub\util_type.cuh(660) : see declaration of 'cub::KeyValuePair'
1>e:\cub-1.6.3\cub\block\../thread/thread_reduce.cuh(59): error C2975: 'cub::KeyValuePair' : invalid template argument for 'ValIsLT', expected compile-time constant expression
1>          e:\cub-1.6.3\cub\util_type.cuh(660) : see declaration of 'cub::KeyValuePair'
1>e:\cub-1.6.3\cub\block\../thread/thread_reduce.cuh(59): warning C4141: '__forceinline' : used more than once
1>e:\cub-1.6.3\cub\block\../thread/thread_reduce.cuh(60): warning C4346: 'cub::AlignBytes<V>::ALIGN_BYTES' : dependent name is not a type
1>          prefix with 'typename' to indicate a type
1>e:\cub-1.6.3\cub\block\../thread/thread_reduce.cuh(60): error C2146: syntax error : missing ';' before identifier 'ThreadReduce'
1>e:\cub-1.6.3\cub\block\../thread/thread_reduce.cuh(60): error C2433: 'cub::ArgMax::T' : '__forceinline' not permitted on data declarations
1>e:\cub-1.6.3\cub\block\../thread/thread_reduce.cuh(60): fatal error C1903: unable to recover from previous error(s); stopping compilation
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 5.5.targets(592,9): error MSB3721: The command ""D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\bin\nvcc.exe" -gencode=arch=compute_10,code=\"sm_10,compute_10\" --use-local-env --cl-version 2010 -ccbin "d:\Program Files\Microsoft Visual Studio 10.0\VC\bin"  -I"D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -I"D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include"  -G   --keep-dir Debug -maxrregcount=0  --machine 32 --compile -cudart static  -g   -DWIN32 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /Zi /RTC1 /MDd  " -o Debug\example_block_radix_sort.cu.obj "E:\cub-1.6.3\examples\block\example_block_radix_sort.cu"" exited with code 2.
1>

Jacob

unread,
Jul 12, 2017, 1:33:00 AM7/12/17
to cub-users
Did you solve this? I met similar problem.
Reply all
Reply to author
Forward
0 new messages