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: bubble Subject: Re: Cxx Compile error Date: 2000/04/27 Message-ID: <390859E9.CD363D74@hccnet.nl>#1/1 X-Deja-AN: 616378887 Content-Transfer-Encoding: 7bit References: <3908283E.B2CB22A4@hccnet.nl> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@hccnet.nl X-Trace: news.hccnet.nl 956848889 11839 193.173.112.70 (27 Apr 2000 15:21:29 GMT) Organization: Hobby Computer Club News Network Mime-Version: 1.0 Reply-To: Xperience@cyberjunkie.com NNTP-Posting-Date: 27 Apr 2000 15:21:29 GMT Newsgroups: comp.os.linux.alpha Martin Sinot wrote: > > bubble wrote in message > news:3908283E.B2CB22A4@hccnet.nl... > > Hi there, > > > > 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. > > Keep in mind I am a novice at C. > > > > Thanks for your trouble > > > > Jigal > > #include > > In C, it is allowed to use a function without declaring it before. > The compiler will issue a warning and treat it as a function with > unknown parameters and returning int. Very dangerous on Alphas, > if the function happens to return a pointer. > In C++ this is forbidden. Functions must always be declared before > use. g++ allows the use of undefined functions on the same basis > as C, but this is not correct (g++ allows too much). Most other > C++ compilers correctly reject undeclared functions. > Unfortunately, some programmers are sloppy, use undeclared functions > and turn off compiler warnings rather than fixing them. Reason why > a program can be accepted by g++ and not by another compiler (like > Compaq cxx). > > -- > Martin Sinot > Nijmegen, Netherlands > martin@spase.nl Hi Eey there I go, here's the awnser. Thanks very much Jigal Rotterdam,Netherlands.