STL problems in GCC 4.1.2
Eljay Love-Jensen
eljay@adobe.com
Thu Feb 21 19:43:00 GMT 2008
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