| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
| X-Trace-PostClient-IP: | 68.147.129.203 |
| From: | Brian Inglis <Brian DOT Inglis AT SystematicSW DOT Invalid> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: assert statement is not accepted in C++ |
| Organization: | Systematic Software |
| Message-ID: | <6mvh01d0o5i8g4ugn5qt5nho401v3r5ros@4ax.com> |
| References: | <cu7tua$ri$00$1 AT news DOT t-online DOT com> <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 |
| 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
<cbfalconer AT yahoo DOT com> 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 <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?
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |