I am trying to lint my project. But it seems like Lint is unable to recognize the classes such as std::string
, std::vector
and std::queue
. I am using lib-std.lnt
config file as well but of no use, facing the errors like following.
Error 40: Undeclared identifier 'queue'
Error 40: Undeclared identifier 'string'
Error 10: Expecting a structure or union
Does any one know how to resolve the issue?
for sample code :-
#include<string>
int main(void)
{
std::string str;
return ;
}
=================================== and the out put is as following
/>lint-nt -iC:\ghs\comp_20121\ansi proj2.lnt snip.cpp
PC-lint for C/C++ (NT) Vers. 8.00x, Copyright Gimpel Software 1985-2008
--- Module: snip.cpp (C++)
typedef wchar_t _Wchart;
C:\ghs\comp_20121\scxx\yvals.h:747 Warning Error 10: Expecting ';'
C:\ghs\comp_20121\scxx\yvals.h:747 Warning Error 19: Useless Declaration
std::string str;
snip.cpp:4 Warning Error 40: Undeclared identifier 'string'
snip.cpp:4 Warning Warning 522: Expected void type, assignment, increment or decrement
snip.cpp:4 Warning Error 10: Expecting ';'
来源:https://stackoverflow.com/questions/14837125/lint-unable-to-recognizing-stdstring-class