In my CMake file I download 2.19 and build it. However there are errors in compilation.
The first states:
C:\dev\repos\MyApp\build_deps\cppcheck-src\lib\cppcheck.cpp(880,36): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'simplecpp::Toke nList' [C:\dev\repos\MyApp\build_deps\cppcheck-build\lib\cppcheck-core.vcxproj]</function-style-cast>
That line is return simplecpp::TokenList{data, size, files, file.spath(), outputList};
return simplecpp::TokenList{data, size, files, file.spath(), outputList};
Looking in tokenlist.h I can see there is no constructor that takes 5 items.
There are other errors regarding this too:
C:\dev\repos\MyApp\build_deps\cppcheck-src\lib\tokenlist.cpp(334,32): error C2661: 'simplecpp::TokenList::TokenList': no overloaded function takes 5 arguments [C:\de v\repos\MyApp\build_deps\cppcheck-build\lib\cppcheck-core.vcxproj]
This might be related to compiling with C++17 or higher. Have you tried main branch?
Log in to post a comment.
In my CMake file I download 2.19 and build it. However there are errors in compilation.
The first states:
That line is
return simplecpp::TokenList{data, size, files, file.spath(), outputList};Looking in tokenlist.h I can see there is no constructor that takes 5 items.
There are other errors regarding this too:
Last edit: graham.reeds 2026-02-03
This might be related to compiling with C++17 or higher. Have you tried main branch?