From: rjvdboon AT cs DOT vu DOT nl (Boon van der RJ) Newsgroups: comp.os.msdos.djgpp Subject: Re: Help with setup Date: 10 Nov 1997 13:20:32 GMT Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Lines: 31 Message-ID: <6471n0$9cn$1@star.cs.vu.nl> References: NNTP-Posting-Host: sloep24.cs.vu.nl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk DELCO J (jd3881 AT csc DOT albany DOT edu) wrote: >Hello, > Am having a bit of trouble with installing the dgjpp 32 bit protected It isn't the installing part. >mode compiler on my computer. I have followed the instructions, and when >I try to compile a simple program, I get an error message saying that >'cout' isn't defined. I'm using #include , and cout <<" >string";. The iostream.h file was installed to the c:\djgpp\lang\cxx >directory. As per the djgpp faq, I have included the contents of my >environ.lst, autoexec.bat and config.sys. It's a common mistake among newbies, you should link the library for the functions you use. In this case you should compile your program with gcc -o file.exe file.cc -liostream or (which does the equivalent) gxx -o file.exe file.cc this is because the linker doesn't know anything about the implementation of 'cout <<' which is in libiostream.a (you don't need it -lc for c/c++ programs, because libc is linked in by default.) Remember to put the libraries to be linked into your program as the last parameters in your command line. hth, Robert -- rjvdboon AT cs DOT vu DOT nl | "En dat is niet waar!" sprak Staatsecretaris www.cs.vu.nl/~rjvdboon | Netelenbos (onderwijs) fel.