From: firewind Newsgroups: comp.os.msdos.djgpp Subject: Re: I don't know how to compile! Date: 14 Aug 1997 00:25:19 GMT Organization: Netcom Lines: 11 Message-ID: <5stj9f$8hb@sjx-ixn5.ix.netcom.com> References: <970813154204_1216939487 AT emout06 DOT mail DOT aol DOT com> NNTP-Posting-Host: elp-tx2-12.ix.netcom.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Mega354 AT aol DOT com wrote: > I'm only 14 and learning C++...and I need a compiler to compile the programs > i make....and i have DJGPP....but i don't know that much....how can I make my > code and tell the compiler to compile it....without it saying 'undefined > reference to cout'..or something like that....I know i have the code > right...i just don't know how to use DJGPP and i read the docs...but they are > too comfusing.. If you find the "docs" confusing, you could at least look at the file README.1ST, which states clearly and concisely commonly used compilation command lines. earch I did (starting with the ORA book on make) suggested to me that maybe the shell I *thought* I had just was not being invoked for these lines. Hence, the test makefile I originally tried, which I must admit is contrived, was intended to test just what *was* being invoked. I got the text of it from the ORA book (p. 133, in the section "Default Shell"). Proof of the pudding: The following works just fine: bash.exe/stest$ MAKESHELL=$DJDIR/bin/sh.exe; export MAKESHELL bash.exe/stest$ make cshell echo h:/bin/sh.exe h:/bin/sh.exe if test -f makefile; then echo cshell; fi cshell bash.exe/stest$ MAKESHELL, according to the README.dos file, takes precedence over both $SHELL and $COMSPEC. So I can put the MAKESHELL setting into DJGPP.ENV and solve my make problem without changing the value of $SHELL at all. My subshell syntax makefile also now works as intended. >TANSTAAFL: you can't have all these goodies in the ported Make without >paying some price. DOS is just too dumb, and GNU Make is just too >complex and full of features, to make that possible. However, my >experience suggests that Makefiles that set SHELL inside rules are very >rare indeed. But even makefiles that do *not* set the SHELL variable can be affected, as I have seen with my subshell-syntax example. Ah, well; as you said, TANSTAAFL. Mostly, everything *does* work as expected, which is a rich and satisfying treat. Thanks once again for your patience and support. ---------------------------------------------------- Peter J. Farley III (pjfarley AT dorsai DOT org)