开发者

compile error in cygwin

I am getting these errors when i compile sim_routing.cc program by this command:

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

The following errors are shown:

../../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>

When i tried to change the commom/priority_q.h file, it shows it is read only file, so changes cannot be made.

How can these errors be corrected?


Not sure about this, but you could possibly try to include

#include <cstring>

before you include that priority_q.h file in your code. That should bring strcat's declaration in scope before that template is processed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜