From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,a4a4244d855fba97 X-Google-Attributes: gid111c93,public From: Tony Hammitt Subject: Re: Cxx Compile error Date: 2000/04/27 Message-ID: <39087A1D.6ACE55F4@kc.rr.com>#1/1 X-Deja-AN: 616427931 Content-Transfer-Encoding: 7bit References: <3908283E.B2CB22A4@hccnet.nl> <390842CE.883F7D47@hccnet.nl> <39084E61.BFC93BF7@fender.iris.com> <39085945.D9F0C505@hccnet.nl> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@rr.com X-Trace: typhoon2.kc.rr.com 956856861 24.94.177.44 (Thu, 27 Apr 2000 12:34:21 CDT) MIME-Version: 1.0 Reply-To: thammitt@kc.rr.com NNTP-Posting-Date: Thu, 27 Apr 2000 12:34:21 CDT Newsgroups: comp.os.linux.alpha bubble wrote: > > Aaron Sawyer wrote: > > > > bubble wrote: > > > bubble wrote: > > > > I was trying to compile blackbox using cxx from compaq. > > > > All was going well until the compiler hit Icon.cc where it gave the > > > > following error: > > > > > > > > cxx: Error: Icon.cc, line 137: identifier "strcmp" is undefined > > > > if (strcmp(name, "Unnamed")) { > > > > ____________^ > > > > > > > > could comeone xplain why the identifier is undefined, > > > > and strcmp is a function or am I really mistaken. > > [snip] > > > So am i to conclude that something needs to be defined for strcmp > > > as well? > > > If so what would that be? > > > > Odd. The quick (though not necessarily correct) fix is to put the line > > > > #include > > > > at the beginning of Icon.cc ; this will define strcmp() and other > > string manipulation functions. > > > > I would then be asking myself why it was missing (or what other > > bits are missing from the compile/link/load/runtime environment) > > and hunt... (is there a makefile? was there a README? ... ) > > > > HTH, > > =Aaron > > -- > > .============================v============================. > > | D. Aaron Sawyer : Aaron.Sawyer@IrisSP.AMcom | > > | Iris Associates : Voice: +1.978.392.5298 | > > | Five Technology Park Drive : Fax: +1.978.392.6669 | > > | Westford, MA 01886 : Email: s/SP.AM/./ above | > > `============================^============================' > > Hi, > > Thanks for your reply Aaron and Alex. > > These are very saine question i need to learn to ask myself when > confronted with problems like these. > Could you specify how I would hunt. Should I use ladebug to debug try > lclint to look for errors in the source. > See the thing is that blackbox does compile using g++, just not when > using cxx. > I was sifting through documents included in the cxx release but couldn't > find the precise awnser. > I tried several extra compile options to now avail. > But yeah I could have looked for string.h :). > It is indeed an important question why wasn't it included ? > Could it be that g++ isn't that strict, compared to cxx? > > Anyway thanks for your help It is very simple, for every function that it complains about, type 'man ' like 'man strcmp'. Sometimes this gives you the wrong manual section, in which case try 'man 3 ' At the top of the manual page is a list of files that must be included for the function to be prototyped correctly, like '#include ' in this case. Real soon now, I'll have my website exampleprograms.org up and running, which I intend to be a place that answers questions like these with documented code examples. People will be able to make requests for programs, which other visitors can fulfil. I don't want to advertise too much here, but I did answer your question. Regards, Tony Hammitt