From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: STRING problems! Date: Tue, 28 Apr 1998 18:21:05 -0400 Organization: Two pounds of chaos and a pinch of salt. Lines: 53 Message-ID: <35465651.953@cs.com> References: <35462A31 DOT 4E83C790 AT acpub DOT duke DOT edu> <3546360D DOT 7114 AT cs DOT com> <35464CC1 DOT 4E00589F AT acpub DOT duke DOT edu> NNTP-Posting-Host: ppp144.cs.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Robert Vila wrote: > > I think I may have identified the problem. I don't think any C++ programs > compile. I tried to compile something with the vector class and that gave me > the same kind o ferrors. Any ideas? I noticed that I do not have gxx. I have > gpp, and i'm not sure what the difference is. I know i downloaded everything > and unzipped correctly, or so i thought. any other ideas? You are actually getting undefined references, so your problem is not with the included headers. If the compiler had been unable to find them, you'd have gotten a different error (could not find 'iostream.h', etc.). BTW, the instructions in readme.1st haven't been updated for gcc 2.8.0; gxx was deleted from the new version and replaced with 'g++' for folks with LFNs and 'gpp' for those without. They both work the same as 'gxx'. > > 4) If you get undefined references, are you linking the C++ libraries > > when you compile (RHIDE should do this automatically)? > > I compiled with RHIDE, and that didn't happen I'm not quite sure what you mean here. Do C++ programs compile in RHIDE, or do you get different errors depending on whether you use DOS or RHIDE? RHIDE sometimes has problems with a LFN installation of gcc 2.8.0; this results in it being unable to locate streambuf.h. If this is your problem, edit the file %DJDIR%/share/rhide/rhide.env (or create it if it does not exist) and add the line: RHIDE_TYPED_LIBS_DJGPP.cc=stdcxx Save, and RHIDE should compile C++ properly. If your problem is in DOS, use 'gpp' instead of 'gcc' to compile. This causes the correct libraries for C++ programs to be linked automatically. If you want to do it manually, add "-lstdcxx" to the end of your command line. One last thing; make sure that you are naming your source files correctly in RHIDE. .cc, .cpp, and .cxx are all valid C++ extensions. hth! -- --------------------------------------------------------------------- | John M. Aldrich |"Men rarely (if ever) manage to dream | | aka Fighteer I |up a god superior to themselves. Most | | mailto:fighteer AT cs DOT com |gods have the manners and morals of a | | http://www.cs.com/fighteer |spoiled child." - Lazarus Long | ---------------------------------------------------------------------