delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
From: | Martin Ambuhl <mambuhl AT earthlink DOT net> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: assert statement is not accepted in C++ |
Date: | Mon, 07 Feb 2005 10:49:54 -0500 |
Lines: | 29 |
Message-ID: | <36ph1cF53ug72U1@individual.net> |
References: | <cu7tua$ri$00$1 AT news DOT t-online DOT com> |
Mime-Version: | 1.0 |
X-Trace: | individual.net 2kf17zPsjRkMpjksiCnC1Q5f9jWKdR1Wt1Nv6eyGy7dxfY473H |
User-Agent: | Mozilla Thunderbird 0.9 (Windows/20041103) |
X-Accept-Language: | en-us, en |
In-Reply-To: | <cu7tua$ri$00$1@news.t-online.com> |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
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 |
Mok-Kong Shen wrote: > > The following code works o.k. (in DJGPP Version 2.03) with > file name prog.c but doesn't compile with file name prog.cc. > (Error message 'undefined reference to .....', which vanishes > when the assert statement is commented out.) > > #include <stdio.h> > #include <assert.h> > int main() > { int i=1; > assert(i>0); > printf("i = %d\n",i); > return 0; > } I strongly suspect that you are not linking the C++ library files. Are you perhaps trying to use gcc $FLAGS a.cc instead of gpp $FLAGS a.cc ? -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |