From: Jason Newsgroups: comp.os.msdos.djgpp Subject: Why doesn't C++ work!?!?! Date: Thu, 03 Sep 1998 15:41:27 -0600 Organization: Sandia National Labs Lines: 38 Message-ID: <35EF0D07.DC9983E1@sandia.gov> NNTP-Posting-Host: tags2pc.csu890.sandia.gov 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 Hey guys: I have not been able to get any C++ programs compiled - and on the DJGPP website, it says that gcc should know what to to with the file according to the file's extenstion. I tried to compile a simple C++ program that couts one line (it looks like this): #include main(void) { cout << "This is a test."; } (Simple enough?!?) it seemed to treat it like a C source. Here is some sample output: d:/dgjpp/tmp\ccca2vyh(.text+0x21):cpptest.cpp: undefined reference to 'cout' d:/dgjpp/tmp\ccca2vyh(.text+0x26):cpptest.cpp: undefined reference to 'ostream::operator<<(char const *)' What I get from this is it's not even recognizing the 'cout' command! gcc works perfectly fine with C sources (*.c), but it has this same problem with *.cpp and *.C . Anyone else had this problem? Help me! :O) -- ----------------------------------------- | ------------------------------------- | | | Jason Saavedra - Student and Psycho | | | | Sandia National Laboratories | | | | Albuquerque, NM | | | | ----------------------------------- | | | | Any insanities expressed are mine. | | | | (you may borrow, but please return) | | | ------------------------------------- | -----------------------------------------