Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-13-2012, 11:52 AM   #1
Registered: Jul 2012
Posts: 106
Blog Entries: 1

Rep: Reputation: Disabled
Question c++11 std on g++4.7: gnu++11 vs c++11 - is there a difference?

In compiling concurent code from C++ 11 with g++ 4.7 [FINALLYY!!! <3 <3 <3 ] Debian Sweezzy gives me option for the std compiler beetween gnu+11 or c++11

Is there a difference or are they the same?

Any example code from my C++ concurency book compiles teh same without hits, including example that had problems previously with 4.4, and even 4.6.4


in previous versions (g++4.4) i had to include in the command after std

For forum's SE optimization
To compile a C++ 11 code in linux with g++ 4.4.5 type
g++ -std=gnu++0x -lpthread code.cpp -o runfile
what was that lpthread? i can stil put it with no effect. compile the same

Last edited by esgol; 07-13-2012 at 11:54 AM.
Old 07-13-2012, 03:36 PM   #2
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 996
Blog Entries: 15

Rep: Reputation: 136Reputation: 136
Hi, from man gcc :
The 2011 ISO C++ standard plus amendments. Support for C++11 is still experimental, and may change in incompatible ways in future releases.

GNU dialect of -std=c++11. Support for C++11 is still experimental, and may change in incompatible ways in future releases.
gnu++11 might allow some gnuisms. c++11 won't.

-lpthread must be used if you use the pthread (POSIX threads) specification for threading. Knowing that C++11 supports synchronization primitives, and that you're looking at using it, for portability I'd use std::thread. I'll admit not knowing the status of these new features in their GNU implementation, so proceed with care.

1 members found this post helpful.
Old 07-14-2012, 03:56 AM   #3
Registered: Jul 2012
Posts: 106

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
what are or could be gnuisms?
Old 07-14-2012, 05:36 AM   #4
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
See chapters 5 and 6 in the documentation (this link is for 4.7.1).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Template algorithm for std::vector and std::string CartmanYO Programming 4 09-08-2010 10:56 AM
License issue difference between The GNU Lesser General Public License and GNU tkmsr Linux - General 2 06-18-2010 02:21 PM
What's the difference between PMake and GNU Make? meili100 Programming 2 02-29-2008 10:31 AM
Could Someone Please Explain the Difference Between GNU and Linux? ECRocker General 20 05-25-2007 06:55 PM
What is the difference between Linux and GNU/Linux ? jalalmn Linux - General 9 03-11-2005 05:37 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration