STL problems in GCC 4.1.2
David Arthur
darthur@tantacomm.com
Thu Feb 21 20:08:00 GMT 2008
Hi Eljay,
The GCC I am using is what was included in the SuSE Linux Enterprise Server
10 installation on the machine I am compiling with, so I am not sure how it
was built.
The program you gave was entered verbatim, and it compiles with no errors
and runs nicely. :)
Thanks for your quick replies!
Dave
-----Original Message-----
From: Eljay Love-Jensen [mailto:eljay@adobe.com]
Sent: Thursday, February 21, 2008 1:43 PM
To: David Arthur
Cc: GCC-help
Subject: Re: STL problems in GCC 4.1.2
Hi David,
Hmmm.
It says that you are using a pre-release. Can you get a non-pre-release
build of 4.1.2? Probably doesn't matter.
It looks like it was built with "../configure", which is not a supported way
to build GCC. That could be causing problems.
It looks like it is using the correct cc1 and collect2.
What errors does this short C++ "foo.cpp" program produce?
------------------------------------------------------------
// c++ -std=c++98 -Wall -Wextra -pedantic -o foo foo.cpp
#include <iostream>
#include <list>
#include <string>
using std::cout;
using std::endl;
using std::list;
using std::string;
int main()
{
typedef list<string> MyList;
MyList myList;
myList.push_back("hello");
myList.push_back("world");
myList.push_back("goodnight");
myList.push_back("moon");
for(MyList::iterator i = myList.begin(); i != myList.end(); ++i)
{
cout << *i << endl;
}
}
------------------------------------------------------------
--Eljay
More information about the Gcc-help
mailing list