WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: request : gcc supports c++ 11 standard  (Read 1477 times)

Offline lovelypp

  • Jr. Member
  • **
  • Posts: 51
request : gcc supports c++ 11 standard
« on: September 30, 2020, 12:14:35 AM »
when port my app from other linux dist,  there are some lib requre c++11 support, like log4cplus, boost(version 1.72) qt ? and others

thanks
« Last Edit: September 30, 2020, 12:17:13 AM by lovelypp »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: request : gcc supports c++ 11 standard
« Reply #1 on: September 30, 2020, 12:48:06 AM »
Hi lovelypp
Run this command:
Code: [Select]
tc@E310:~$ gcc -std=c++11 2>&1
gcc: fatal error: no input files
compilation terminated.
tc@E310:~$
That response means it supports c++11.

If the response includes:
Code: [Select]
gcc: error: unrecognized command line option '-std=c++11That means it does not support c++11

If it supports c++11, try adding this to CXXFLAGS:
Code: [Select]
-std=c++11

Offline lovelypp

  • Jr. Member
  • **
  • Posts: 51
Re: request : gcc supports c++ 11 standard
« Reply #2 on: September 30, 2020, 01:08:25 AM »
Rich
   sorry, I seems that it supports c++11,  I have made a mistake.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: request : gcc supports c++ 11 standard
« Reply #3 on: September 30, 2020, 01:11:44 AM »
Hi lovelypp
That's OK. I make mistakes all the time. ;D

Offline lovelypp

  • Jr. Member
  • **
  • Posts: 51
Re: request : gcc supports c++ 11 standard
« Reply #4 on: September 30, 2020, 01:44:38 AM »
 :)