How to provide libstdc library?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have created c++ application in Ubuntu linux and now trying to run it on Centos linux. Got error:



/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found


How usually is performed in this situation? Can I somehow put all libs to my executable? Should I install them like:



sudo apt-get install libstdc++6


Is it normal this libruary is not not installed in standard fresh linux installation?










share|improve this question





















  • How to provide the required library on Centos is really off topic here - but see for example GLIBCXX_3.4.21 not found on CentOS 7. Yes you can "somehow put all libs to my executable", by linking your application statically - see C++ application - should I use static or dynamic linking for the libraries?
    – steeldriver
    Feb 9 at 21:31















up vote
0
down vote

favorite












I have created c++ application in Ubuntu linux and now trying to run it on Centos linux. Got error:



/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found


How usually is performed in this situation? Can I somehow put all libs to my executable? Should I install them like:



sudo apt-get install libstdc++6


Is it normal this libruary is not not installed in standard fresh linux installation?










share|improve this question





















  • How to provide the required library on Centos is really off topic here - but see for example GLIBCXX_3.4.21 not found on CentOS 7. Yes you can "somehow put all libs to my executable", by linking your application statically - see C++ application - should I use static or dynamic linking for the libraries?
    – steeldriver
    Feb 9 at 21:31













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have created c++ application in Ubuntu linux and now trying to run it on Centos linux. Got error:



/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found


How usually is performed in this situation? Can I somehow put all libs to my executable? Should I install them like:



sudo apt-get install libstdc++6


Is it normal this libruary is not not installed in standard fresh linux installation?










share|improve this question













I have created c++ application in Ubuntu linux and now trying to run it on Centos linux. Got error:



/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found


How usually is performed in this situation? Can I somehow put all libs to my executable? Should I install them like:



sudo apt-get install libstdc++6


Is it normal this libruary is not not installed in standard fresh linux installation?







c++






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 9 at 18:14









vico

1,03952141




1,03952141











  • How to provide the required library on Centos is really off topic here - but see for example GLIBCXX_3.4.21 not found on CentOS 7. Yes you can "somehow put all libs to my executable", by linking your application statically - see C++ application - should I use static or dynamic linking for the libraries?
    – steeldriver
    Feb 9 at 21:31

















  • How to provide the required library on Centos is really off topic here - but see for example GLIBCXX_3.4.21 not found on CentOS 7. Yes you can "somehow put all libs to my executable", by linking your application statically - see C++ application - should I use static or dynamic linking for the libraries?
    – steeldriver
    Feb 9 at 21:31
















How to provide the required library on Centos is really off topic here - but see for example GLIBCXX_3.4.21 not found on CentOS 7. Yes you can "somehow put all libs to my executable", by linking your application statically - see C++ application - should I use static or dynamic linking for the libraries?
– steeldriver
Feb 9 at 21:31





How to provide the required library on Centos is really off topic here - but see for example GLIBCXX_3.4.21 not found on CentOS 7. Yes you can "somehow put all libs to my executable", by linking your application statically - see C++ application - should I use static or dynamic linking for the libraries?
– steeldriver
Feb 9 at 21:31











1 Answer
1






active

oldest

votes

















up vote
1
down vote













To compile C++ on a freshly installed ubuntu system one would need the package 'build-essential'.



$sudo apt install build-essential






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004638%2fhow-to-provide-libstdc-library%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    To compile C++ on a freshly installed ubuntu system one would need the package 'build-essential'.



    $sudo apt install build-essential






    share|improve this answer
























      up vote
      1
      down vote













      To compile C++ on a freshly installed ubuntu system one would need the package 'build-essential'.



      $sudo apt install build-essential






      share|improve this answer






















        up vote
        1
        down vote










        up vote
        1
        down vote









        To compile C++ on a freshly installed ubuntu system one would need the package 'build-essential'.



        $sudo apt install build-essential






        share|improve this answer












        To compile C++ on a freshly installed ubuntu system one would need the package 'build-essential'.



        $sudo apt install build-essential







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 9 at 18:27









        Bart J.

        245




        245



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004638%2fhow-to-provide-libstdc-library%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            GRUB: Fatal! inconsistent data read from (0x84) 0+xxxxxx

            `kcmshell` modules relation with `/usr/share/applications`

            How to enroll fingerprints to Ubuntu 17.10 with VFS491