I am working on a Mac OS X(panther) with XCode 1.5. I tried to run the
following simple program.It compiles with no errors and warning. This
is the simple program
#include <iostream>
#include<list>
#include<string>
using namespace std;
typedef list<string> StrList;
int main (int argc, char * const argv[]) {
int num;
StrList strlist;
string str;
cout<<"Enter Number of strings\n";
cin>>num;
cout<<"\nEnter strings\n";
for(int i=0;i<num;i++)
{
cin>>str;
strlist.push_back(str);
}
return 0;
}
When I try to run the program the following run time error occurs
ZeroLink: unknown symbol
'__ZNSt24__default_alloc_templateILb1ELi0EE8allocateEm'
Executable ⌠testSTLList■ has exited due to signal 6 (SIGABRT).
If someone knows what the problem is Please help me.
Thanking you in advance :help:
* posted via http://www.mymac.ws
* please report abuse to http://xinbox.com/mymac
lothar.behrens@lollisoft.de - 09 Nov 2005 13:30 GMT
Hi,
I have compiled it with
cc test.cpp -lstdc++
Entring this:
2
fgdfg
dfgdfg
works without any error.
Lothar