From: Robert Vila Newsgroups: comp.os.msdos.djgpp Subject: Re: STRING problems! Date: Tue, 28 Apr 1998 17:40:19 -0400 Organization: Duke University Lines: 62 Message-ID: <35464CC1.4E00589F@acpub.duke.edu> References: <35462A31 DOT 4E83C790 AT acpub DOT duke DOT edu> <3546360D DOT 7114 AT cs DOT com> NNTP-Posting-Host: res-110-170.dorm.duke.edu 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 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? Here is the stuff you requested. Here is my test program #include #include int main() { string word = "test"; cout << test << endl; return 0; } Keep in mind that I have messed around with the details of this implementation, such as changing #include to #include <_string.h> and chaging "string" to "String" and stuff like that as was suggested. Here is the results of redirecting the compile information to a file... c:/djgpp/tmp/ccaaaaaa1.o(.text+0x24):test.cpp: undefined reference to `String::String(char const *)' c:/djgpp/tmp/ccaaaaaa1.o(.text+0x3c):test.cpp: undefined reference to `operator<<(ostream &, String const &)' c:/djgpp/tmp/ccaaaaaa1.o(.text+0x57):test.cpp: undefined reference to `String::~String(void)' c:/djgpp/tmp/ccaaaaaa1.o(.text+0x7b):test.cpp: undefined reference to `String::~String(void)' And to answer these questions.... > 1) Can you compile C programs? Yes. > 2) Can you compile C++ programs that use other headers besides > _string.h? Now that I check, no. > 3) Can you compile from DOS? Yes > 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 > 5) Are you spelling #include correctly? (Don't laugh; somebody did this > earlier.) Yessir > 6) Have you made any changes to your 'djgpp.env'? Nope