Date: Thu, 3 Sep 1998 23:38:37 -0500 (CDT) From: JAU-BING LIN To: djgpp AT delorie DOT com Subject: Re: Why doesn't C++ work!?!?! In-Reply-To: <35EF0D07.DC9983E1@sandia.gov> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 3 Sep 1998, Jason wrote: > 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 *)' # Your code looks find. # You may check the AUTOEXEC.BAT file first. Refer the README file, and # make sure you had setup the PATH and Evironment. > 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! # Both *.cpp and *.cc can be reconized as c++ source code by DJGPP. # Therefore, you do not need to worry about the extention filename.