From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie needs help... Date: Mon, 30 Dec 1996 18:40:36 -0800 Organization: Two pounds of chaos and a pinch of salt Lines: 118 Message-ID: <32C87D24.7B4A@cs.com> References: <5a8kmr$7lo AT mn5 DOT swip DOT net> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp108.cs.com 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 Johan Levin wrote: > > I have unzipped all files needed into their correct subdirectories. > (The files I installed are these: You did not get the latest versions. DJGPP 2.00 should still work fine, but for maximum service and support, get the 2.01 distributions. The different files are noted below: v2/faq202b.zip v2misc/csdpmi3b.zip v2misc/pmode11b.zip v2gnu/bnu252b.zip bnu27b.zip v2/djdev200.zip djdev201.zip v2/djtst200.zip djtst201.zip v2gnu/gcc272b.zip gcc2721b.zip v2gnu/txi360b.zip txi390b.zip v2gnu/gpp272b.zip gpp2721b.zip v2gnu/lgp271b.zip v2gnu/obc272b.zip obc2721b.zip v2gnu/gdb412b.zip gdb416b.zip v2apps/rhideb.zip rhide10b.zip v2gnu/mak373b.zip mak375.zip > Anyway, now what. Do I have to alter my environment variables > (At least the path should be changed I think.) What else do > I have to do? What you should have done is get the 'readme.1st' file from the same place as the rest of the DJGPP files and read it thoroughly. It (and the FAQ) explicitly state how you need to set up your environment. In summary, you must make the following modifications to your AUTOEXEC.BAT: Add the C:\DJGPP\BIN directory to your PATH, *BEFORE* the directories of any other compilers on your system. Add the line, "SET DJGPP=C:\DJGPP\DJGPP.ENV". Of course, if you put DJGPP somewhere else, change the above directories accordingly. > I have looked at the FAQ but I found no help. Try section 8.1. > What files include information about how to use the compiler? > (An example would help.) v2/readme.1st v2/faq202b.zip From "readme.1st": Compilation ----------- GCC is a command-line compiler, which you invoke from DOS command line. To compile and link a single-file C program, use a command like this: gcc myfile.c -o myfile.exe -lm The -lm links in the lib/libm.a library (trig math) if needed. (Link order is significant, so if you need libm.a, always put `-lm' at the end of the command line.) To compile a C or C++ source file into an object file, use this command line: gcc -c -Wall myfile.c (for C source) or gcc -c -Wall myfile.cc (for C++ source) This produces the object file myfile.o. The `-Wall' switch turns on many useful warning messages which is especially beneficial for new users of GCC. (Other C++ extensions, like .cpp, are also supported, see section 8.4 of the FAQ for details.) To link several C object files into an executable program, use a command line such as this: gcc -o myprog.exe mymain.o mysub1.o mysub2.o This produces `myprog.exe' which can be run from the DOS prompt. To link a C++ program, use gxx instead of gcc, like this: gxx -o myprog.exe mymain.o mysub1.o mysub2.o This will automatically search the C++ libraries, so you won't need to mention them on the command line. You can also combine the compilation and link steps, like this: gcc -Wall -o myprog.exe mymain.c mysub1.c mysub2.c Further info about the plethora of GCC switches can be found in the GCC on-line documentation. To begin reading it, install the Texinfo package (txi370b.zip, see the ``On-line docs'' section below) and type this: info gcc invoking 8<------- snip -------- Interesting... I just noticed that the version of info listed in 'readme.1st' is wrong. It should say 'txi390b.zip'. Oh, well. I'll inform the developers. ;) Good luck! -- --------------------------------------------------------------------- | John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com | | Plan: To find ANYONE willing to | http://www.cs.com/fighteer | | play Descent 2 on DWANGO! | Tagline: | ---------------------------------------------------------------------