Date: Thu, 17 May 2001 10:41:32 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "greg.pearce" cc: djgpp AT delorie DOT com Subject: Re: C++ problem In-Reply-To: <000801c0de49$750c67a0$d16168d5@self> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 16 May 2001, greg.pearce wrote: > int main() > { > cout << "Hello world!, this is easy!"; > return 0; > } > > i then saved it as cplus.cpp and then copyed and pasted it into the gpp = > compiler > it gave me the message: > > c:/djgpp/bin/ld.exe:C:\DJGPP\BIN\CPLUS.~CP: file format not recognized; = > treating > as linker script > c:/djgpp/bin/ld.exe:C:\DJGPP\BIN\CPLUS.~CP:1: parse error The file's name is the problem: it has a weird ".~cp" extension, instead of the normal ".cpp". Section 8.5 of the FAQ explains how the compiler deduces the file's format and language given its extension. This weird name probably appeared because you ``pasted it into gpp''. Whatever that means, don't do that: the DJGPP compiler is a command-line program, it doesn't support well drag-and-drop and any other communication methods you are used to on Windows, primarily because Windows does all kinds of funky things when these methods are used with DOS programs. I'm quite sure the weird file name appeared because Windows somehow mangled the file's original name when you pasted it. Simply invoke the compiler from the DOS box's prompt, by typing "gpp cplus.cpp" etc.