Re: undefined __throw
Re: undefined __throw
- Subject: Re: undefined __throw
- From: Jeremy Sagan <email@hidden>
- Date: Thu, 07 Jul 2005 19:18:44 -0400
Obviously I am a newbie with Xcode and C++ exceptions but I can't
understand why this other simple program I found online does not
compile.
After having linking problems with try, catch and throw, I tried
creating a new carbon project but when I try to compile it, xcode
cannot find iostream.h even though "iostream.h" will open-quickly
without problem. I tried changing my header paths but that does not
seem to help.
Please help. Here is the file c++ test file I found....
/
************************************************************************
**
*
* Language: C++
* Purpose: Program to demonstrate the 'try', 'catch' and 'throw'
statements.
* Author: M J Leslie
* Date: 21-Mar-98
*
* Compile: The following command was used to compile.
*
* g++ -fhandle-exceptions throw.cc -o throw
*
************************************************************************
**/
#include <iostream.h> // For cout.
void ErrorFunc(int Error);
main()
{
ErrorFunc(0);
ErrorFunc(1);
}
void ErrorFunc(int Error)
{
try
{
cout << "Error code is " << Error << endl;
if (Error > 0 )
{
throw(Error); // This statement causes control to
jump
// to the 'catch' statement
}
cout << "No Error occoured" << endl;
}
catch(int n)
{
cout << "Error number is " << n << endl;;
}
}
On Jul 7, 2005, at 2:33 PM, Jeremy Sagan wrote:
I am trying to link in a library to my project that uses c++
exceptions and now when I link I get undefined errors on symbol
__throw and __unexpected. Do I need to link to a c++ library? How do I
do it?
Thanks,
Jeremy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden