Path: utzoo!attcan!uunet!elroy.jpl.nasa.gov!sdd.hp.com!hplabs!nsc!brian From: brian@nsc.nsc.com (Brian Marley) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: DOS gcc (dj1bin) problems, malformed input file error Message-ID: <1991Mar1.174409.25693@nsc.nsc.com> Date: 1 Mar 91 17:44:09 GMT References: <61762@masscomp.westford.ccur.com> <7594@uklirb.informatik.uni-kl.de> Organization: National Semiconductor, Santa Clara Lines: 46 In article <7594@uklirb.informatik.uni-kl.de> kirchner@informatik.uni-kl.de (Reinhard Kirchner) writes: >From article <61762@masscomp.westford.ccur.com>, by bobg@masscomp.westford.ccur.com (Bob Getz): >> >> Hello, netlanders; >> >> I recently got the GNU C++ for DOS via ftp from grape..... >> >> I tried to compile a very simple test program and got the following: >> >> e:\gcc test.cpp >> ld: malformed input file (not rel or archive) test.cpp >> e:\> >> >A friend of mine tried the gcc and he told me: > >Source files MUST NOT HAVE Control-Z at their end. > >This maz be the reason for the error above. > >This is a real foolish problem in such a tremendous package. Control-Z >is standard from many editors, the authors should have checked this. > >Reinhard Kirchner >Univ. Kaiserslautern, Germany >kirchner@uklirb.informatik.uni-kl.de The problem is more obvious than that! I made this same mistake. Although I can't comment on ^Z characters (my editor doesn't make them), most of your problem is that you created your source file with a ".cpp" suffix. GCC is not Zortech; it requires a suffix of ".cc" for a C++ source file. The error diagnostic was so strange apparently because GCC uses ".cpp" as the suffix for its pre-processor output; it may have been getting terribly confused. Also, naming the program with simply ".c" will cause the compiler to do a standard C (not C++) compilation, causing the preprocesor pass to complain about mismatched single-quotes in include files (it ignores the // comment markers and gets confused about words like "don't" in the comments...). It would have been nice if the dj1bin distribution had come with basic operating instructions. But you get what you pay for, and this is a GREAT package now that I have it running! Many, many thanks to all those who have contributed! -- Brian Marley, brian@nsc.nsc.com (work) bjmcpm!brian@foxpv2.uucp (home)