Menu

Errors when building CppCheck from 2.19.0

2026-02-03
2026-02-10
  • graham.reeds

    graham.reeds - 2026-02-03

    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};

    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]

     

    Last edit: graham.reeds 2026-02-03
  • CHR

    CHR - 2026-02-10

    This might be related to compiling with C++17 or higher. Have you tried main branch?

     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.