From: bbaecht AT sunflower DOT com (Bryant Baecht) Newsgroups: comp.os.msdos.djgpp Subject: Re: # directive for # include giving me an error Date: Fri, 20 Feb 1998 05:51:05 GMT Organization: Sunflower Cablevision's Datavision USENET Server Lines: 35 Message-ID: <6cj5g1$f77$1@news.sunflower.com> References: <6cgd2j$g1u$1 AT news DOT sunflower DOT com> <34EC0EB5 DOT 72FAEE9C AT LSTM DOT Ruhr-UNI-Bochum DOT De> NNTP-Posting-Host: 24.124.25.3 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <34EC0EB5 DOT 72FAEE9C AT LSTM DOT Ruhr-UNI-Bochum DOT De>, Thomas Demmer wrote: >Bryant Baecht wrote: >> >> Hi, >> I am just starting with the djgpp c and c++ compilers. I am running on >> Windows NT 4.0. I have compiled and ran simple c programs, but I am having a >> problem with the c++ compiler/preprocessor. For some reason I get the >> following error: >> >> undefined or invalid # directive >> >> The line I get the error on is my #include line. >> >> I have setup the DJGPP environment variable, so what am I missing? > >The only thing I can imagine is a typo in that line. If there >was something wrong with your set up, you'd get a file not >found error. Maybe you have some unprintable character >in that line, so just yank it and re-type it >again. OK, I got it to work for me. I couldn't get it run from the command line, but I installed rhide and got it to work. First off, I wasn't even calling the correct program. I jotted down the notation from rhide and the following command line works: gcc -o hello.exe hello.o -lstdcx I will venture out to the page with the gcc options to see if I can figure out what the -lstdcx does, and why I had to put hello.o on the line, but oh well. I guess without beginners, there would be no future experts. Thanks for helping me though. Bryant Baecht