Analyzing C/C++ Library Migrations at the Package-level: Prevalence, Domains, Targets and Rationales across Seven Package Management Tools
Haiqiao Gu, Yiliang Zhao, Kai Gao, Minghui Zhou · ACM Transactions on Software Engineering and Methodology · 2026
Library migration, i.e., replacing a third-party library with another, happens when a library can not meet the project’s requirements and is non-trivial to accomplish. To mitigate the problem, substantial efforts have been devoted to understanding its characteristics and recommending alternative libraries, especially for programming language (PL) ecosystems with a central package hosting platform, such as Python (PyPI), JavaScript (npm), and Java (Maven). However, to the best of our knowledge, understanding of C/C++ library migrations is still lacking, possibly due to challenges resulting from the fragmented and complicated dependency management practices in the C/C++ ecosystem. Given the widespread use and critical role of C/C++, the lack of such understanding hinders the formulation of best practices and tools to facilitate library migrations in the C/C++ ecosystem. To bridge this knowledge gap, this paper analyzes 124,786 dependency configuration file changes in 19,943 C/C++ projects that utilize different package management tools and establishes a C/C++ library migration dataset, comprising 2,191 migrations and 717 migration rules. Based on the dataset, we investigate the prevalence, domains, target library, and rationales of C/C++ library migrations and compare the results with three widely investigated PLs: Python, JavaScript, and Java. We find that the overall trend in the number of C/C++ library migrations is similar to Java, which grew slowly and stabilized, and then decreased slightly. Notably, the number of migrations in emerging package management tools, such as Meson and Vcpkg, is on the rise. Migrations across different package management tools are also observed, with the most common being from Git submodules to Conan. In C/C++, library migrations mainly occur in three domains, i.e., GUI, Build, and OS development, but are rare in domains (e.g., Testing and Logging) that dominate library migrations in the three compared PLs. 83.46% of C/C++ source libraries only have one migration target, suggesting that our library migration dataset could be used directly to recommend migration targets for C/C++ developers. We find four C/C++-specific migration reasons, such as less compile time and unification of dependency management, revealing the unique dependency management requirements in C/C++ projects. We believe our findings can help C/C++ developers make more informed library migration decisions and shed light on the design of C/C++ library migration tools.