Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / November 2005



Tip: Looking for answers? Try searching our database.

RunTime ErrorWhen using STL in XCode 1.5 in Mac OS X Panther

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Suresh_Abraham - 09 Nov 2005 13:23 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.