我正在构建一个包含 cuda 代码的 cmake 项目。我无法编译包含多个 h 文件的 cuda 文件之一。这是我收到的编译器错误
In file included from /usr/include/c++/4.4/bits/basic_ios.h:39,
from /usr/include/c++/4.4/ios:45,
from /usr/include/c++/4.4/ostream:40,
from /usr/include/c++/4.4/iostream:40,
from /home/pfeifs/Developement/Deform/LinuxDeform/LibDeform/Deform/cutil_comfunc.h:20,
from /home/pfeifs/Developement/Deform/LinuxDeform/LibDeform/Deform/VectorMathDef.h:22,
from /home/pfeifs/Developement/Deform/LinuxDeform/LibDeform/src/Deform/VectorMath.cu:15:
/usr/include/c++/4.4/bits/locale_facets.h:2521:44: error: macro "isspace" passed 2 arguments, but takes just 1
isspace()
被定义为需要一个参数的宏,<ctype.h>
并在locale_facets.h
. (这些都是标准文件。)但是,在 , 的开头 locale_facets.h
包含<cctype>
并且取消声明宏。
非常感谢您对此问题的任何帮助或见解。