我正在编译一组.C文件,并尝试使用xlC编译器版本9.0在AIX6.0上创建目标文件。它会生成以下错误:
1540-1172 (S) More than one function "operator new" has non-C++ linkage.
1540-0424 (I) "operator new" is declared on line 92 of "/usr/vacpp/include/new".
1540-0121 (S) A template cannot have "C" linkage.
1540-0140 (S) The text "<" is unexpected. "List" may be undeclared, ambiguous, or may require "typename" qualification.任何形式的指导或帮助都将不胜感激。
$ xlC -qversion
C for AIX version 6.0.0.0编译器xlC仅是C++编译器。我已经验证了#include周围没有外部的'C‘。请让我知道解决方案,如果有人在这方面的工作。
发布于 2013-09-27 20:47:10
当您试图重载外部"C“中的函数时,就会出现这种消息。
外部"C"{
结构A{};
struct B{};
无效测试(A arg);
空洞试验(B arg);
}
"q.cpp",第5.9行: 1540-1172 (S)多个函数“测试”具有非C++链接。
“测试”,第4.9行: 1540-0424 (I) "q.cpp“在"q.cpp”的第4行声明。
https://stackoverflow.com/questions/18984521
复制相似问题