delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
Message-ID: | <4207BED6.F86CE89A@yahoo.com> |
From: | CBFalconer <cbfalconer AT yahoo DOT com> |
Organization: | Ched Research http://cbfalconer.home.att.net |
X-Mailer: | Mozilla 4.75 [en] (Win98; U) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: assert statement is not accepted in C++ |
References: | <cu7tua$ri$00$1 AT news DOT t-online DOT com> <36ph1cF53ug72U1 AT individual DOT net> |
Lines: | 32 |
Date: | Mon, 07 Feb 2005 19:41:42 GMT |
NNTP-Posting-Host: | 12.76.140.178 |
X-Complaints-To: | abuse AT worldnet DOT att DOT net |
X-Trace: | bgtnsc05-news.ops.worldnet.att.net 1107805302 12.76.140.178 (Mon, 07 Feb 2005 19:41:42 GMT) |
NNTP-Posting-Date: | Mon, 07 Feb 2005 19:41:42 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Martin Ambuhl wrote: > 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 Don't you mean gxx? -- "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 |