当 Makefile 尝试编译 .cu (CUDA) 文件时会生成错误。
我们能够使用专门为它制作的 .hpp 自行编译它。当我们试图让它在一个现有的头文件下编译时,它拥有一个 .cpp(换句话说,.hpp、.cpp 加上一个 .cu),我们不断收到这个奇怪的编译错误。
为了便于阅读,以下所有消息都以该目录为前缀:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.4/include/g++-v4/tr1_impl/
留言:
type_traits(226): error: expected an identifier
type_traits(227): error: expected a ")"
type_traits(227): error: a template argument list is not allowed in a declaration of a primary template
type_traits(229): error: expected an identifier
type_traits(230): error: expected a ")"
type_traits(230): error: a template argument list is not allowed in a declaration of a primary template
type_traits(232): error: expected an identifier
type_traits(233): error: expected a ")"
type_traits(233): error: expected a ">"
type_traits(235): error: expected an identifier
type_traits(236): error: expected a ")"
type_traits(236): error: expected a ">"
type_traits(238): error: expected an identifier
type_traits(239): error: expected a ")"
type_traits(239): error: expected a ">"
type_traits(241): error: expected an identifier
type_traits(242): error: expected a ")"
type_traits(242): error: expected a ">"
type_traits(244): error: expected an identifier
type_traits(245): error: expected a ")"
type_traits(245): error: expected a ">"
type_traits(247): error: expected an identifier
type_traits(248): error: expected a ")"
type_traits(248): error: expected a ">"
是否可以有一个带有 .cu 和 .cpp 的单个 .hpp ?