Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the error report of linux compilation and installation td=c++11

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)05/31 Report--

Today, I would like to share with you the relevant knowledge points about how to solve the linux compilation and installation error report td=c++11. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article.

We are using the linux system to compile and install the prompt for unrecognized command line option "- std=c++11" unrecognized command line option "- std=c++11". The reason for this compilation error is not high enough in the Globe + gcc version.

Solution:

Update gcc version the default is 4.4.7 version of gcc

Command View:

# gcc-v

Update method

1. Download the compressed package for compilation and installation

Http://ftp.gnu.org/gnu/gcc/

Here is the download address provided by the official website.

Let's start downloading and decompressing

Wgettar-jxvfgcc-4.8.2.tar.bz2

2. Download the dependencies for compilation requirements

This magical script file will help us download, configure, and install dependent libraries, saving us a lot of time and energy.

Cdgcc-4.8.0./contrib/download_prerequisites

3. Create a folder

Mkdirgcc-build-4.8.2cdgcc-build-4.8.2

4. Generate Makefile file

.. / configure-enable-checking=release-enable-languages=c,c++-disable-multilib

5. Compile and install

Make&&makeintsall

6. Inspection

Try to write a program segment tryCpp11.cc with the feature of Clipper 11, using shared_ptr

1//tryCpp11.cc2#include3#include45intmain () 6 {7std::shared_ptrpInt (newint (5)); 8std::cout

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report