c++c++11ubuntusoftware-packaging

from which version std::regex is available in libstdc++


I have written a tool in C++ which uses features. It uses std::regex to provide regex functionality.

It requires GCC (>=4.9.0) to compile the code.

This is the error message on a Ubuntu system where libstdc++6 is not installed.

/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found

I am packaging this software for Ubuntu, but can not figure out which version of libstdc++6 should I put as a dependency of my program.

And what will be the dependency of this program for a general case regarding all Unix like OS that I should notify the user beforehand?


Solution

  • I am packaging this software for Ubuntu, but can not figure out which version of libstdc++6 should I put as a dependency of my program.

    The minimum dependency is the version that you linked your program with.

    So if you linked with gcc-4.9.1 then they need at least libstdc++6-4.9.1

    And what will be the dependency of this program for a general case regarding all Unix like OS that I should notify the user beforehand?

    It needs a compiler that supports std::regex from C++11 ... but you already said that in the question.