| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-bounces using -f |
| From: | pavenis AT lanet DOT lv |
| To: | Silver <SilverBanana AT gmx DOT de>, djgpp AT delorie DOT com |
| Date: | Wed, 30 Jan 2002 18:14:40 +0200 |
| MIME-Version: | 1.0 |
| Subject: | Re: throwing an int does not work |
| Message-ID: | <3C583810.15701.1A221B3@localhost> |
| In-reply-to: | <3C580F74.4F484969@gmx.de> |
| X-mailer: | Pegasus Mail for Windows (v4.01) |
| Reply-To: | djgpp AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | djgpp AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
On 30 Jan 2002 at 16:21, Silver wrote:
> Hi!
>
> Any idea why this code does not link?
>
> int main()
> {
> try
> {
> int x=1;
> throw x;
> }
> catch (int a)
> {
> // Do sth.
> }
> }
>
> The linker responded something like this:
> undefined refernce to __cxa_throw and so on.
>
> Is it a bug or an installation issue?
I guess You're using gcc-3.0.2 or gcc-3.0.3
If You are compiling C++ application, You should link
with libstdcxx.a (or at least libsupcxx.a if You're not using
C++ standard program library).
Use gpp.exe instead of gcc.exe to avoid need to specify
it in comand line
Andris
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |