home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1997 March / Simtel-MSDOS-Mar1997-CD2.iso / disc2 / djgpp / v2 / readme.1st < prev   
Encoding:
Text File  |  1996-10-18  |  10.1 KB  |  306 lines

  1. This is the README.1ST file for DJGPP Version 2.01
  2.  
  3. DJGPP is a free environment for developing 32-bit protected mode
  4. software in C/C++ under MS-DOS.
  5.  
  6. Status and other information (online docs, FAQ, mail archives) are
  7. made available through the djgpp web pages at http://www.delorie.com/.
  8. Discussion of DJGPP and questions about its usage or features are
  9. through the djgpp news group (post to comp.os.msdos.djgpp) and djgpp
  10. mailing list (send your messages to <djgpp@delorie.com>, subscribe
  11. through <listserv@delorie.com>).  Look on the web page for information
  12. on the latest versions of various DJGPP packages.
  13.  
  14. Version information is in manifest/*.ver within each zip.  Contents
  15. are in manifest/*.mft in each zip.
  16.  
  17. A different, more complete (and longer) tutorial on how to get started
  18. with DJGPP was written by An <avly@remus.rutgers.edu> and is available
  19. by anonymous ftp from x2ftp.oulu.fi in the
  20. /pub/msdos/programming/djgpp2 directory, filename djtut-bm.zip.  You
  21. can also read it on-line by pointing your Web browser to this URL:
  22.  
  23.     http://remus.rutgers.edu/~avly/djgpp.html
  24.  
  25.  
  26.  
  27. THE DISTRIBUTION
  28. ****************
  29.  
  30. The 'b' zips include the binaries and on-line documentation.  At the
  31. time of writing this file, the various packages are:
  32.  
  33. FAQ      A short file which points you to other documents you should
  34.            read (including the full FAQ list).
  35.  
  36. v2/
  37. unzip386 A free program to unzip the archive (like PKUNZIP) 
  38. djdev201 DJGPP V2 Development Kit and Runtime
  39. djlsr201 DJGPP V2 Base Library Sources
  40. djtst201 DJGPP V2 Test Programs
  41. djcrx201 DJGPP V2 For Building a Cross-to-DOS Compiler
  42. faq201b  The full FAQ list in various formats (Info, ASCII, HTML...)
  43. faq201s  The Texinfo sources of the FAQ and tools to generate all the
  44.           different formats of the FAQ
  45.  
  46. v2gnu/
  47. bnu27b   GNU binutils 2.7 for DJGPP V2
  48. bnu27s   GNU binutils 2.7 sources
  49. bsn124b  GNU bison 1.24 for DJGPP V2
  50. bsn124s  GNU bison 1.24 sources
  51. dif271b  GNU diffutils 2.7.1 for DJGPP V2
  52. dif271s  GNU diffutils 2.7.1 sources
  53. find41b  GNU findutils 4.1 for DJGPP V2
  54. find41s  GNU findutils 4.1 sources
  55. flx252b  GNU Flex 2.5.2 for DJGPP V2
  56. flx252s  GNU Flex 2.5.2 sources
  57. gcc2721b GNU GCC 2.7.2.1 for DJGPP V2
  58. gcc2721s GNU GCC 2.7.2.1 sources
  59. gdb416b  GNU Debugger 4.16 for DJGPP V2
  60. gdb416s  GNU Debugger 4.16 sources
  61. gpp2721b GNU G++ 2.7.2.1 for DJGPP V2 (no libs)
  62. grep20b  GNU grep 2.0 for DJGPP V2
  63. grep20s  GNU grep 2.0 sources
  64. gzp124b  GNU gzip 1.2.4 for DJGPP V2
  65. gzp124s  GNU gzip 1.2.4 sources
  66. lgp271b  GNU libg++ 2.7.1 for DJGPP V2
  67. lgp271s  GNU libg++ 2.7.1 sources
  68. mak373b  GNU Make 3.73 for DJGPP V2
  69. mak373s  GNU Make 3.73 sources
  70. obc2721b GNU ObjC 2.7.2.1 for DJGPP V2
  71. pat21b   GNU patch 2.1 for DJGPP V2
  72. pat21s   GNU patch 2.1 sources
  73. sed118b  GNU sed 1.18 for DJGPP V2
  74. sed118s  GNU sed 1.18 sources
  75. txi370b  GNU texinfo 3.7 for DJGPP V2
  76. txi370s  GNU texinfo 3.7 sources
  77.  
  78. v2tk/
  79. bcc2grx  Borland GUI to GRX interface for DJGPP V2
  80. grx20    GRX 2.0 Graphics Library for DJGPP V2
  81. pdc22    Public-domain Curses library
  82.  
  83. v2misc/
  84. csdpmi3b CWSDPMI, Charles Sandmann's free DPMI server binaries and docs
  85. csdpmi3s CWSDPMI sources
  86. wmemu2b  WM's 387 emulator binaries for DJGPP V2
  87. wmemu2s  WM's 387 emulator sources for DJGPP V2
  88.  
  89.  
  90.  
  91. GETTING STARTED
  92. ***************
  93.  
  94. The info below is the minimum new users should know to get them up and
  95. running with DJGPP.  Please read the DJGPP documentation and the FAQ
  96. list for further details.  New users are encouraged to read the FAQ
  97. list in its entirety.
  98.  
  99.  
  100.  
  101. What to download
  102. ----------------
  103.  
  104. In general, download the binary distributions only; most of the people
  105. don't need the source distributions.
  106.  
  107. To build C programs, you'll need djdev201.zip, gcc2721b.zip, and
  108. bnu27b.zip.  For C++, also get gpp2721b.zip and lgp271b.zip.  To read
  109. the online manuals, get txi370b.zip and run "info".  If you don't have
  110. a DPMI server installed, you'll need csdpmi3b.zip.  (Windows, QDPMI,
  111. 386Max, NWDOS, OS/2, Win/NT and Linux DOSEmu all provide DPMI
  112. services, so you don't need CWSDPMI in those environments.)  For more
  113. details, download faq201b.zip (the full FAQ list) and read Chapter 4
  114. there.
  115.  
  116.  
  117. Installation
  118. ------------
  119.  
  120. 1. Create a directory for DJGPP, say C:\DJGPP.  If you have version
  121.    1.x installed, it's best to delete the contents of its `bin/'
  122.    subdirectory or move it to another directory (not on your PATH),
  123.    and delete everything else from that installation.  (Some of the
  124.    problems reported by users of DJGPP v2 were caused by inadvertently
  125.    mixing it with old v1.x programs.)  The only program from v1.x that
  126.    you should keep is `go32.exe'.
  127.  
  128. 2. Unzip the zip files from that directory, preserving the directory
  129.    structure.  For example:
  130.  
  131.     pkunzip -d gcc2721b
  132.   or
  133.     unzip386 gcc2721b
  134.  
  135. 3. After unzipping all the zip files in, set the DJGPP environment
  136.    variable to point to the file DJGPP.ENV in the main DJGPP
  137.    installation directory and add its BIN subdirectory to your PATH.
  138.    Assuming your DJGPP installation is rooted at C:\DJGPP, put these
  139.    two lines into your autoexec.bat file:
  140.  
  141.     set DJGPP=C:\DJGPP\DJGPP.ENV
  142.     set PATH=C:\DJGPP\BIN;%PATH%
  143.  
  144. 4. Run the go32-v2.exe program without arguments:
  145.  
  146.     go32-v2
  147.  
  148.    It should report how much DPMI memory and swap space can DJGPP use
  149.    on you system, like this:
  150.  
  151.     DPMI memory available: 8020 Kb
  152.     DPMI swap space available: 39413 Kb
  153.  
  154.    (The actual numbers will vary according to amount of RAM installed
  155.    on your system, the available disk space and the DPMI server.)  If
  156.    go32-v2 reports less than 4 MBytes of DPMI memory, read section 3.8
  157.    of the FAQ.  (If you have more than that, but want to get the
  158.    optimal performance from your system, read that section anyway.)
  159.  
  160.  
  161. Compilation
  162. -----------
  163.  
  164. GCC is a command-line compiler, which you invoke from DOS command
  165. line.  To compile and link a single-file C program, use a command like
  166. this:
  167.  
  168.     gcc myfile.c -o myfile.exe -lm
  169.  
  170. The -lm links in the lib/libm.a library (trig math) if needed.  (Link
  171. order is significant, so if you need libm.a, always put `-lm' at the
  172. end of the command line.)
  173.  
  174. To compile a C or C++ source file into an object file, use this
  175. command line:
  176.  
  177.     gcc -c -Wall myfile.c  (for C source)
  178.   or
  179.     gcc -c -Wall myfile.cc (for C++ source)
  180.  
  181. This produces the object file myfile.o.  The `-Wall' switch turns on
  182. many useful warning messages which is especially beneficial for new
  183. users of GCC.  (Other C++ extensions, like .cpp, are also supported,
  184. see section 8.4 of the FAQ for details.)
  185.  
  186. To link several C object files into an executable program, use a
  187. command line such as this:
  188.  
  189.     gcc -o myprog.exe mymain.o mysub1.o mysub2.o
  190.  
  191. This produces `myprog.exe' which can be run from the DOS prompt.
  192.  
  193. To link a C++ program, use gxx instead of gcc, like this:
  194.  
  195.     gxx -o myprog.exe mymain.o mysub1.o mysub2.o
  196.  
  197. This will automatically search the C++ libraries, so you won't need to
  198. mention them on the command line.
  199.  
  200. You can also combine the compilation and link steps, like this:
  201.  
  202.     gcc -Wall -o myprog.exe mymain.c mysub1.c mysub2.c
  203.  
  204. Further info about the plethora of GCC switches can be found in the
  205. GCC on-line documentation.  To begin reading it, install the Texinfo
  206. package (txi370b.zip, see the ``On-line docs'' section below) and type
  207. this:
  208.  
  209.     info gcc invoking
  210.  
  211.  
  212.  
  213. Development environment (aka IDE)
  214. ---------------------------------
  215.  
  216. Currently, DJGPP doesn't come with an integrated environment of its
  217. own.  You are free to choose any editor that can launch DOS programs
  218. and catch their output, to act as an IDE.  Many people who work with
  219. DJGPP use a DOS port of GNU Emacs (it's available from the same place
  220. you got DJGPP) which can be compiled with DJGPP.  Emacs is a very
  221. powerful editor (for example, it has a built-in Info reader, so you
  222. can read DJGPP documentation without leaving the editor), but many
  223. other free editors can serve as an IDE.  The only task that these
  224. editors (including Emacs) cannot do is to run a debugger in a
  225. full-screen session.
  226.  
  227. A DJGPP-specific IDE called RHIDE is in beta testing and should be
  228. available in the near future.
  229.  
  230.  
  231.  
  232. Debugging
  233. ---------
  234.  
  235. To debug a program, you must first compile its source files with `-g'
  236. switch:
  237.  
  238.     gcc -c -Wall -g mymain.c
  239.     gcc -c -Wall -g mysub1.c
  240.     gcc -c -Wall -g mysub2.c
  241.  
  242. and then link with `-g', but give the linker the name of the output
  243. file with no .exe extension:
  244.  
  245.     gcc -g -o myprog mymain.o mysub1.o mysub2.o
  246.  
  247. (note the `-o myprog' as opposed to `-o myprog.exe').  This will
  248. produce the COFF output named `myprog' as well as the DOS executable
  249. `myprog.exe'; debuggers need the COFF binary.
  250.  
  251. Then run your program under the debugger:
  252.  
  253.     fsdb myprog
  254. or
  255.     gdb myprog
  256.  
  257. (You will have to get gdb416b.zip if you want to debug with GDB.)
  258. FSDB has its help screen; press F1 to read it.  GDB comes with Info
  259. docs (see below) which can be read with info.exe.
  260.  
  261.  
  262.  
  263. On-line docs
  264. ------------
  265.  
  266. Most of the on-line documentation is organized in a special hypertext
  267. format used by the GNU project.  Each package brings its docs which
  268. are files with .iNN extension and are unzipped into the info/
  269. subdirectory of your main DJGPP installation directory.  To browse
  270. these docs, get and unzip the file txi370b.zip, then run info.exe.  If
  271. you don't know how to use Info, press `?'.
  272.  
  273.  
  274.  
  275. Compatibility with V1.x
  276. -----------------------
  277.  
  278. Existing binaries compiled under DJGPP V1.x can be used for
  279. applications for which there is no v2.0 version.  V1 programs cannot
  280. run V2 programs (but v2 programs *can* run v1 programs), so don't try,
  281. say, using v1.x Make to run v2.0 compiler.
  282.  
  283.  
  284.  
  285.  
  286. --- COPYRIGHT ---
  287.  
  288. DJGPP V2 is Copyright (C) 1995 by DJ Delorie.  Some parts of libc.a
  289. are Copyright (C) Regents of the University of California at Berkeley.
  290.  
  291. GNU software (gcc, make, libg++, etc) is Copyright by the Free
  292. Software Foundation.
  293.  
  294. DJGPP V2's copyright allows it to be used to produce commercial
  295. applications.  However, if you include code or libraries that are not
  296. part of djgpp (like gnu's libg++) then you must comply with their
  297. copyrights.  See Chapter 19 of the FAQ for more details.
  298.  
  299.  
  300. Enjoy!
  301.  
  302.  
  303. DJ Delorie
  304. dj@delorie.com
  305. http://www.delorie.com/
  306.