[Bug 1272713] [NEW] Hello World does not compile with C++11
Volodya
volodya at whengendarmesleeps.org
Sat Jan 25 17:01:29 UTC 2014
Public bug reported:
The following source code:
#include <iostream>
int main()
{
std::cout << "Hello world\n";
}
compiled with the following line:
$gcc hello.cpp -std=c++11
Produces the following error:
/tmp/ccN5qDSY.o: In function `main':
hello.cpp:(.text+0x14): undefined reference to `std::cout'
hello.cpp:(.text+0x19): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccN5qDSY.o: In function `__static_initialization_and_destruction_0(int, int)':
hello.cpp:(.text+0x41): undefined reference to `std::ios_base::Init::Init()'
hello.cpp:(.text+0x58): undefined reference to `std::ios_base::Init::~Init()'
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: gcc 4:4.8.1-2ubuntu3
ProcVersionSignature: Ubuntu 3.11.0-15.23-generic 3.11.10
Uname: Linux 3.11.0-15-generic i686
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: i386
Date: Sat Jan 25 20:52:23 2014
InstallationDate: Installed on 2013-12-22 (34 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release i386 (20131016.1)
MarkForUpload: True
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: gcc-defaults (Ubuntu)
Importance: Undecided
Status: New
** Tags: apport-bug i386 saucy
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/1272713
Title:
Hello World does not compile with C++11
Status in “gcc-defaults” package in Ubuntu:
New
Bug description:
The following source code:
#include <iostream>
int main()
{
std::cout << "Hello world\n";
}
compiled with the following line:
$gcc hello.cpp -std=c++11
Produces the following error:
/tmp/ccN5qDSY.o: In function `main':
hello.cpp:(.text+0x14): undefined reference to `std::cout'
hello.cpp:(.text+0x19): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/tmp/ccN5qDSY.o: In function `__static_initialization_and_destruction_0(int, int)':
hello.cpp:(.text+0x41): undefined reference to `std::ios_base::Init::Init()'
hello.cpp:(.text+0x58): undefined reference to `std::ios_base::Init::~Init()'
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: gcc 4:4.8.1-2ubuntu3
ProcVersionSignature: Ubuntu 3.11.0-15.23-generic 3.11.10
Uname: Linux 3.11.0-15-generic i686
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: i386
Date: Sat Jan 25 20:52:23 2014
InstallationDate: Installed on 2013-12-22 (34 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release i386 (20131016.1)
MarkForUpload: True
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1272713/+subscriptions
More information about the foundations-bugs
mailing list