Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!bloom-beacon!eru!hagbard!sunic!news.funet.fi!funic!santra!santra!ahuttune From: ahuttune@niksula.hut.fi (Ari Juhani Huttunen) Newsgroups: comp.lang.c++ Subject: Re: TC++ include file madness Message-ID: Date: 11 Nov 90 16:53:57 GMT References: <58170036@hpclapd.HP.COM> Sender: news@santra.uucp (Cnews - USENET news system) Organization: Helsinki University of Technology, Finland Lines: 32 In-Reply-To: defaria@hpclapd.HP.COM's message of 8 Nov 90 20:22:07 GMT In article <58170036@hpclapd.HP.COM> defaria@hpclapd.HP.COM (Andy DeFaria) writes: >#include >#include >I see that the compiler can find mem.h and compiles it without a hitch. >Then it compiles iostream.h and fails again saying it can't find mem.h!!! >What's going on here? It so happens I have also had trouble with iostream.h and mem.h . In mem.h there is a code fragment: #ifdef __cplusplus extern "C" { #endif etc... (I hope I haven't violated any copyright laws..) This compiles fine with C and C++ modes with both integrated and stand-alone compilers. BUT when I have a file that includes a file that includes iostream.h that includes mem.h this DOES NOT compile fine(C++ mode). (With stand-alone compiler there are no problems.) What gives? (I suspect the compiler in some way changes from C++ to C mode during compilation, but I'm not sure; also in the process it does not undefine __cplusplus. This may have something to do with the fact that my c++ files all end in .c and not .cpp. I HAVE the "compile always with C++ mode" option on.) ps. What does extern "C" { } mean? -- ___ ___ ___ ___ ___ ___ ___ ___ ___ __I I__I I__I I__I I__I I__I I__I I__I I__I I Thank you Ari Huttunen (ahuttune@niksula.hut.fi) I for not smoking! ____________________________________________I