X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Trace-PostClient-IP: 68.147.129.203 From: Brian Inglis Newsgroups: comp.os.msdos.djgpp Subject: Re: assert statement is not accepted in C++ Organization: Systematic Software Message-ID: <6mvh01d0o5i8g4ugn5qt5nho401v3r5ros@4ax.com> References: <36ph1cF53ug72U1 AT individual DOT net> <4207BED6 DOT F86CE89A AT yahoo DOT com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 35 Date: Tue, 08 Feb 2005 18:38:43 GMT NNTP-Posting-Host: 24.71.223.147 X-Complaints-To: abuse AT shaw DOT ca X-Trace: pd7tw1no 1107887923 24.71.223.147 (Tue, 08 Feb 2005 11:38:43 MST) NNTP-Posting-Date: Tue, 08 Feb 2005 11:38:43 MST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Mon, 07 Feb 2005 19:41:42 GMT in comp.os.msdos.djgpp, CBFalconer wrote: >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 >>> #include >>> 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? Changed gpp to cpp, and gxx to gpp around 3.? -- Thanks. Take care, Brian Inglis Calgary, Alberta, Canada Brian DOT Inglis AT CSi DOT com (Brian[dot]Inglis{at}SystematicSW[dot]ab[dot]ca) fake address use address above to reply