From: etb AT engr DOT LaTech DOT edu (Emory Thomas Buch) Subject: Help: trying to compile simple little hello.cc program. To: djgpp AT sun DOT soe DOT clarkson DOT edu Date: Thu, 6 May 1993 15:40:29 -0500 (CDT) Hi: Date: May 6, 1993 I recently received and installed DJ's GCC port to DOS, but when I try to compile a simple c++ program (hello.cc: listing below), #include main () { cout << "Hello Tommy." << "\n"; } I get the following messages (gcc hello.cc): Bad command or file name Can't open c:/tmp/cc000054.s for readingfile not found. c: /djgpp/lib/crt0.o: Undefined symbol _main referenced form text segment ------------------------------------------------------------------------------- System Specs: Toshiba T1800 laptop; 386; 4M RAM; 80M HD; I have followed the instructions to the letter in the README file. I have also looked at the FAQ file. I have double checked (several times) the installation steps, and I am confident that I have correctly done ALL of them with NO typos. ------------------------------------------------------------------------------- When I compile the above program in "C style", everything appears to work fine. ------------------------------------------------------------------------------- Other weird things I have experienced, tinkering around with it, are: when I try: cpp hello.cc 1. can't find the include file(s) in the "cplusinc" directory even though the dos environment variable has been CORRECTLY set. (problem goes away if I give the exact path in the .cc file and modify the other "cplusinc" header files to specify the exact path to them also) 2. cpp chokes on comment lines that have contractions: i.e. // don't ... (unterminated string or character constant) i.e. // dont ... (above error, warning, message ??? goes away) 3. a few other messages have also appeared in corresponding "cplusinc" header files in relation to typeing: cpp hello.cc but after I got rid of all these messages, errors, or warnings, by modifying the "cplusinc" header files (about 3 of them), I tried gcc hello.cc again and I get the same old compile messages that are listed above. ------------------------------------------------------------------------------- Therefore, I am clueless as what to do next? Are there some other installation commands/procedures I should have done that are NOT listed explicitly in the installation instructions in the README file. If so, I didn't do them. Therefore, any help would be appreciated as what to do next? ------------------------------------------------------------------------------- Thanks, Tommy =============================================================================== Emory Thomas Buch | Graduate Student, Computer Science | Louisiana Tech University e-mail: etb AT engr DOT latech DOT edu | Ruston, Louisiana 71272 ===============================================================================