繁体   English   中英

cygwin中的编译错误

[英]compile error in cygwin

通过以下命令编译sim_routing.cc程序时出现这些错误:

../../bin/cxx sim_routing.cc
g++ -Wall -o sim_routing sim_routing.cxx

显示以下错误:

../../common/priority_q.h : In member function 'bool guardedQueue<ITEM>::Validate(Const char*);
error : there are no argument to 'strcat' that depend on template parameter so a declaration of 'strcat' must be avaible.
error : <if you use -fpermissive  g++ will accept your code but allowing use of undeclared name is deprecated>

当我尝试更改commom/priority_q.h文件时,它表明它是只读文件,因此无法进行更改。

如何纠正这些错误?

对此不确定,但您可以尝试包括

#include <cstring>

代码中包含那个priority_q.h文件之前 那应该在处理该模板之前将strcat的声明引入作用域。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM