Date: Thu, 14 Dec 1995 14:19:35 +0200 (IST) From: Eli Zaretskii To: Laszlo Vecsey Cc: djgpp AT delorie DOT com Subject: Re: C++ - Almost there On 12 Dec 1995, Laszlo Vecsey wrote: > Using 'cpp.exe hello.cpp -o hello.exe' it now compiles cleanly, This just runs the pre-processor, so `hello.exe' now holds pre-processed source C++ code: hardly worth calling it .exe! > but I guess I still need to link in some libs before this is truely an exe. > How do I do this? > > Running 'gcc hello.cpp -o hello.exe' spits back errors about cout being > undefined. gcc hello.cpp -o hello -lgpp -lm (compiles and links, creates `hello') coff2exe hello (makes DOS executable `hello.exe') (if you use DJGPP v2.0 beta, the second line above is unnecessary, because the first one creates hello.exe as well as hello). Note that with the above two lines, you don't need to run cpp as a separate pass: gcc does it for you. Please, *please* read the FAQ list, especially if you are a new user of DJGPP. It explains everything you've asked in the past two days. The FAQ is available as faq102.zip from the same place you get DJGPP.