home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3860 < prev    next >
Encoding:
Text File  |  1992-07-29  |  26.9 KB  |  608 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!nntp-server.caltech.edu!brooke
  3. From: brooke@cco.caltech.edu (Brooke Paul Anderson)
  4. Subject: The latest GNU C/C++/make installation manual (for the EMX port)
  5. Message-ID: <1992Jul29.100224.15109@cco.caltech.edu>
  6. Sender: news@cco.caltech.edu
  7. Nntp-Posting-Host: kanga
  8. Organization: California Institute of Technology, Pasadena
  9. Date: Wed, 29 Jul 1992 10:02:24 GMT
  10. Lines: 596
  11.  
  12.  
  13. A USER'S MANUAL FOR THE FREE GNU C AND C++ SOFTWARE-DEVELOPMENT
  14. SYSTEM FOR OS/2 V2.0
  15.  
  16. by Brooke P. Anderson, 7/27/92
  17.  
  18. Brooke Anderson
  19. 1155 E. Del Mar #312
  20. Pasadena, CA  91106
  21. USA
  22. phone:  (818) 577-7555
  23. GEnie address:  BROOKE
  24. Internet address:  brooke@hope.caltech.edu
  25.  
  26. TABLE OF CONTENTS
  27.  
  28. 1.0 Introduction
  29. 2.0 How to get it
  30. 3.0 How to install it
  31.      3.1 Zoo and uz42_16e.zoo
  32.      3.2 Wholeinf.zoo
  33.      3.3 Gnumk362.zoo
  34.      3.4 Gnudev.zoo and emxdev.zoo
  35.      3.5 Emxgdb.zoo and emxgpp.zoo
  36.      3.6 The final steps
  37. 4.0 How to use it
  38.      4.1 Using info
  39.      4.2 Using the compiler
  40.      4.3 Using the debugger
  41.      4.4 Using make
  42. 5.0 Where to get more information
  43. 6.0 Conclusions
  44.  
  45. Appendix 1:  Optional packages
  46. Appendix 2:  Frequently asked questions
  47. Appendix 3:  Sources of distribution
  48.  
  49. 1.0 INTRODUCTION
  50.  
  51. This document describes a free GNU C and C++ software-development
  52. system for OS/2 v2.0.  It tells you how to acquire all the
  53. necessary software, how to install it, how to start using it, and
  54. where to look for more information.
  55.  
  56. The GNU software-development system includes a C and C++
  57. compiler, a debugger, an assembler, a make utility (for
  58. automating the compilation of programs made of many source
  59. files), and a hypertext reader (for reading the documentation). 
  60. The compiler generates full 32-bit, optimized code, and it
  61. supports many OS/2 API calls, so you software developers out
  62. there can use it for PM programming, manipulating semaphores,
  63. manipulating threads, using named pipes, etc.  Optional packages
  64. include emacs (a programmer's editor), a package for using IBM's
  65. OS/2 tool kit, and full source code for all the programs and
  66. libraries in the system.
  67.  
  68. GNU software is originally developed by the Free Software
  69. Foundation, an organization which produces a lot of free software
  70. for UNIX.  After the Free Software Foundation releases the UNIX
  71. versions, people often port them to many other operation systems
  72. (such as OS/2).  Despite the fact that the software is free, the
  73. UNIX community considers it a standard and often prefers it over
  74. other products because of its high quality.  The compilers, for
  75. example, produce well-optimized code; and emacs is one of the two
  76. most popular editors for UNIX.
  77.  
  78. Sometimes, there is more than one port of a GNU program.  For
  79. OS/2, for example, there are two different ports of the GNU C
  80. compiler (called "gcc").  This document discusses only one of
  81. them (the EMX port) since the EMX port provides faster floating
  82. point routines and since it works with a debugger.  Another
  83. difference is that the EMX port produces UNIX-style object files
  84. and uses the GNU linker whereas the other port produces
  85. OS/2-style object files and uses link386.  Hopefully, a future
  86. version of the EMX port will handle OS/2-style object files. 
  87. People frequently produce new versions of and enhancements for
  88. the GNU software and the ports based on it.
  89.  
  90. IMPORTANT:  Not all of the archives described in this document
  91. extract correctly onto FAT file systems, file systems which are
  92. still strangled by the egregious 8.3 file-naming convention.  If
  93. you are still using FAT, you will have to work around some
  94. problems.  For example, the wholeinf.zoo archive, described
  95. below, will not extract or operate properly on FAT.  I think
  96. everything else is FAT compatible, but I haven't checked.  I
  97. recommend that you allocate at least part of your file system for
  98. HPFS and thus leave behind another of the many grim limitations
  99. of MS-DOS.  
  100.  
  101. 2.0 HOW TO GET IT
  102.  
  103. The full software-development system (and the various optional
  104. packages described in Appendix 1) are available from a variety of
  105. sources.  If you have access to Internet, you can get the files
  106. from anonymous-ftp sites.  In the USA, the main anonymous-ftp
  107. site for OS/2 is ftp-os2.nmsu.edu.  In Germany, the main
  108. anonymous-ftp site for OS/2 is rusinfo.rus.uni-stuttgart.de.  The
  109. files are also available on GEnie, and they might be available on
  110. CompuServe and many other on-line services.  Also, see Appendix 3
  111. for a list of people who are willing to distribute the whole
  112. system through regular mail.
  113.  
  114. You need to obtain the files "gnudev.zoo" (which contains the
  115. compiler and some auxiliary programs), "emxdev.zoo" (which
  116. contains more auxiliary programs), "emxgpp.zoo" (which contains
  117. the libraries the compiler needs for C++ programs), "emxgdb.zoo"
  118. (which contains the latest port of the debugger), "gnumk362.zoo"
  119. (which contains make), and "wholeinf.zoo" (which contains the
  120. hypertext reader and all the documentation for the compiler, the
  121. debugger, and make).  See Appendix 1 for a description of what
  122. you need for the optional packages.  By the way, this file is in
  123. the archive "gnustart.zoo" (in case you need to tell someone how
  124. to find it).
  125.  
  126. The above files might be available as ZIP archives instead of ZOO
  127. archives, but that is not a problem as both zip and zoo are
  128. available free for OS/2.  You can get them from the same place
  129. you get the other archives.  You need the file "uz42_16e.zoo"
  130. (which contains unzip).  You also need either "zoo210e.exe"
  131. (which is a self-extracting archive that contains zoo) or both
  132. "zoo210.zoo" (which contains zoo) and "booz.exe" (which contains
  133. a small unZOO program for unarchiving zoo210.zoo).
  134.  
  135. The sizes of the various files are as follows:  zoo210e.exe
  136. (120k), booz.exe (26k), zoo210.zoo (69k), uz42_16e.zoo (84k),
  137. gnumk362.zoo (259k), gnudev.zoo (846k), emxdev.zoo (227k),
  138. emxgdb.zoo (251k), emxgpp.zoo (1232k), and wholeinf.zoo (564k).
  139.  
  140. On GEnie, all the archives are (or soon will be) in the OS/2
  141. library (library 13) of the IBMPC round table.  On
  142. ftp-os2.nmsu.edu, zoo210e.exe and uz42_16e.zoo are in
  143. pub/os2/all/archivers; gnumk362.zoo is in
  144. pub/os2/2.0/programming; wholeinf.zoo and gnustart.zoo are
  145. currently in pub/downloads (but will be moving elsewhere shortly,
  146. maybe to directories with the word "info" in them); and the rest
  147. of the files are in pub/os2/2.0/programming/emx-0.8d.  
  148. On rusinfo.rus.uni-stuttgart.de, check in pub/os2/emx-0.8d and other
  149. likely directories (such as those called "gnu").
  150.  
  151. 3.0 HOW TO INSTALL IT
  152.  
  153. The following subsections describe how to install the various
  154. pieces of the GNU C and C++ software-development system.  Go
  155. through the procedures step by step as described -- the order is
  156. important.  Don't feel compelled to read through any of the
  157. readme files or other documentation spit out during the
  158. unarchiving process -- I think you will have a much easier time
  159. if you go through this document beforehand.
  160.  
  161. 3.1 ZOO AND UZ42_16E.ZOO
  162.  
  163. If you don't already have zoo and unzip, you will need to install
  164. them.  The next paragraph describes the installation procedure
  165. for zoo210e.exe; the one after that describes the procedure if
  166. you instead have booz.exe and zoo210.zoo; and the last paragraph
  167. describes the procedure for installing unzip.
  168.  
  169. zoo210e.exe is a self-extracting archive.  Simply move it to a
  170. convenient directory and type "zoo210e".  Add the name of the
  171. directory zoo is in to the path variable in your config.sys file,
  172. and reboot.  (On my machine, zoo.exe is in c:\apps\zoo, so I
  173. appended "c:\apps\zoo;" to the "SET PATH" statement in
  174. config.sys.)
  175.  
  176. If you have booz.exe and zoo210.zoo instead of zoo210e.exe,
  177. simply move booz.exe and zoo210.zoo to a convenient directory and
  178. type "booz x zoo210".  Then alter config.sys as described in the
  179. previous paragraph, and reboot.
  180.  
  181. To unarchive uz42_16e.zoo, you simply move it to another
  182. convenient directory and type "zoo e uz42_16e".  Add the name of
  183. the directory unzip is in to your path as well, and again reboot. 
  184.  
  185. Now, you can unarchive any ZOO archive by typing "zoo e
  186. filename", and you can unarchive any ZIP archive by typing "unzip
  187. filename", where "filename.zoo" or "filename.zip" is the name of
  188. the archive.
  189.  
  190. 3.2 WHOLEINF.ZOO
  191.  
  192. Copy wholeinf.zoo to any convenient directory and unarchive it. 
  193. It will disgorge a program called "info.exe" (the hypertext
  194. reader), several auxiliary files, and a bunch of documentation
  195. files for itself, the compiler, the debugger, and make.
  196.  
  197. 3.3 GNUMK362.ZOO
  198.  
  199. Copy gnumk362.zoo to any convenient directory and unarchive it. 
  200. The archive will disgorge several files, including two more
  201. archives:  source.zoo and info.zoo.  You can delete info.zoo, as
  202. its contents are duplicated in wholeinf.zoo.  You can keep
  203. source.zoo if you want the source code to make, but it is not
  204. necessary to keep it.
  205.  
  206. Add the name of the directory make is in to your path statement
  207. in config.sys.  (I have make in c:\apps\make, so I appended
  208. "c:\apps\make;" to the "SET PATH" statement in my config.sys.)
  209.  
  210. 3.4 GNUDEV.ZOO AND EMXDEV.ZOO
  211.  
  212. These archives create the directory ".\emx" and a bunch of
  213. directories under that.  Thus, unarchive the files from the
  214. directory in which you want this emx directory.  (In other words,
  215. if you unarchive gnudev.zoo in the directory "\apps", the process
  216. will create \apps\emx, \apps\emx\bin, \apps\emx\lib, and many
  217. other such directories.)
  218.  
  219. 3.5 EMXGDB.ZOO AND EMXGPP.ZOO
  220.  
  221. As with the above two archives, unarchive emxgdb.zoo and
  222. emxgpp.zoo in the directory on top of the emx directory.  In
  223. other words, if the emx directory is \apps\emx, move emxgdp.zoo
  224. and emxgpp.zoo to \apps and unarchive them.
  225.  
  226. IMPORTANT:  These two archives contain newer versions of some of
  227. the files contained in gnudev.zoo and emxdev.zoo.  If zoo or
  228. unzip ask you if you want to replace existing files (i.e.,
  229. overwrite files already on disk), answer "yes".  Make sure that
  230. you do not skip the unarchiving of any files in emxgdb.zoo and
  231. emxgpp.zoo.
  232.  
  233. 3.6 THE FINAL STEPS
  234.  
  235. Now, you need to modify your config.sys file.  The examples below
  236. are from my config.sys file, and I have the emx directory
  237. installed under c:\apps.  Thus, my system has the directories
  238. "c:\apps\emx\dll", "c:\apps\emx\lib", "c:\apps\emx\include", and
  239. so on -- you will need to modify the following examples so that
  240. the directories are specified correctly.  
  241.  
  242. First, you need to specify in your libpath the location of
  243. emx.dll.  In my config.sys, I have
  244.  
  245. LIBPATH=.;C:\OS2\DLL;C:\OS2\MDOS;C:\;C:\OS2\APPS\DLL;c:\apps\emx\dll;
  246.  
  247. Second, you need to set a few environmental variables so that the
  248. compiler knows where to find various files:
  249.  
  250. set C_INCLUDE_PATH=c:/apps/emx/include
  251. set LIBRARY_PATH=c:/apps/emx/lib
  252. set CPLUS_INCLUDE_PATH=C:/apps/emx/include.cpp;C:/apps/emx/include
  253.  
  254. IMPORTANT:  you need to use forward slashes ("/") and not
  255. backward slashes ("\") in the previous three lines.  Do NOT use
  256. forward slashes in your libpath statement.
  257.  
  258. Now, reboot your machine so that these definitions take effect. 
  259. Then go into the emx\lib\misc directory and type "make", and
  260. finally go into the emx\lib\math directory and type "make". 
  261. These last two actions update some libraries, and you must make
  262. sure you rebooted the machine once before executing the make
  263. commands.
  264.  
  265. This completes the installation process.
  266.  
  267. 4.0 HOW TO USE IT
  268.  
  269. Now, you are ready to use info (the hypertext reader), to compile
  270. programs, to debug programs, and to use make.  The next
  271. subsections discuss each of these actions in turn.
  272.  
  273. 4.1 USING INFO
  274.  
  275. Go into the directory in which info.exe resides.  Type "info". 
  276. You are now looking at a screen that has some information on the
  277. top half (information such as "Typing 'd' returns here, 'q'
  278. quits, '?' lists all info commands, 'h' gives a primer for
  279. first-timers . . .") and a list of subjects near the bottom
  280. (subjects such as "Info", "Gcc", "Gdb", "Make", "Gdbint", and
  281. "Cpp".).  
  282.  
  283. Go ahead and type "h" for a tutorial.  The most basic functions
  284. to remember are:  type "q" to quit, type "?" to get a list of
  285. commands, hit the space bar or PgDn key to go down a page, press
  286. the Del key or the PgUp key to go up a page, press "n" to go to
  287. the next node (think of a node as being a collection of one or
  288. more pages dealing with a single topic), press "p" to go to the
  289. previous node, use the up and down arrow keys to highlight
  290. choices of new nodes to jump to, and press enter to jump to the
  291. highlighted node.
  292.  
  293. Just play around with it a little while, and you will get the
  294. hang of it.  Type "d" to get back to the main directory, use the
  295. down arrow to highlight "Gcc", press enter, press the down arrow
  296. to highlight "Contributors", press enter, scan through the pages
  297. of text by hitting the PgDn key a couple of times, type "?" to
  298. see a list of commands, type "p" a couple of times, etc.
  299.  
  300. You can also read the info files with emacs.  See Appendix 1 for
  301. details.
  302.  
  303. 4.2 USING THE COMPILER
  304.  
  305. To compile a C source file called "myprog.c", type "gcc -o
  306. myprog.exe myprog.c".  The -o switch tells gcc that it should
  307. call the resulting executable "myprog.exe".  To compile the C++
  308. source file "myprog.cc", type "gcc -o myprog.exe myprog.cc
  309. -lgpp".  C++ source files should have the extension ".cc".  The
  310. -lgpp switch tells gcc to link the C++ libraries.  You can also
  311. tell gcc to optimize your code by using the -O switch.  There are
  312. two levels of optimization (-O and -O2, the highest being -O2). 
  313. Thus, for the fastest-executing code (at the expense of time to
  314. compile and of size of the executable), you would type "gcc -O2
  315. -o myprog.exe myprog.c" for myprog.c and "gcc -O2 -o myprog.exe
  316. myprog.cc -lgpp" for myprog.cc.
  317.  
  318. Note:  Specifying "-o myprog.exe" is important.  If you don't
  319. specify ".exe" as the suffix of the output file name, the
  320. compiler will generate a UNIX-style executable which will not run
  321. under OS/2 even if you subsequently rename the file so that it
  322. has a .exe extension.
  323.  
  324. 4.3 USING THE DEBUGGER
  325.  
  326. To debug a program, you need to compile it with the -g switch: 
  327. "gcc -g -o myprog.exe myprog.c" for myprog.c and likewise for
  328. myprog.cc.  After compiling, you then type "gdb myprog.exe" to
  329. start the debugger.  Type "h" at the debugger prompt to get a
  330. list of help topics.  gdb supports all sorts of breakpoints
  331. (including conditional ones), and you can watch variables, set
  332. variables to different values, etc.  For example, to get help on
  333. running programs from within the gdb, you can type "help
  334. running".  That will give you a list of commands such as run,
  335. kill, step, etc.  You can get help on individual commands by
  336. typing, for example, "help step".
  337.  
  338. The following is a sample compile and debug session.  Go into the
  339. emx\test directory and type "gcc -g -o hello.exe hello.cc -lgpp"
  340. to compile hello.cc.  Type "hello" to run it, to see if the
  341. compiler is functioning.  The program will print "Hello, world!"
  342. on the screen.  Now type "gdb hello.exe" to start gdb.  At the
  343. prompt "(gdb)", type "list main" to list the function "main". 
  344. Then type "break 5" to cause execution to stop at line 5 in the
  345. main function.  Type "run" to start execution -- it will stop at
  346. line 5.  Type "print argc" to see the value of the variable
  347. "argc".  Type "step" to run line 5 then halt execution at the
  348. next line.  Type "quit" to quit.  To list a function (main(),
  349. say) that is longer than a screenful, type "list main"; then type
  350. "list" again to list the next screenful of main.
  351.  
  352. You can run the debugger interactively from within emacs, too. 
  353. This arrangement provides a more visual system similar to
  354. MicroSoft's CodeView or Borland's Integrated Development
  355. Environment.  See Appendix 1 for details.
  356.  
  357. 4.4 USING MAKE
  358.  
  359. Assume you have a program made of the following source files: 
  360. "myprog1.c" and "myprog2.c".  You might manually compile these
  361. files by typing "gcc -o myprog.exe myprog1.c myprog2.c".  Of
  362. course, if you change only one of the files, typing such a
  363. command causes the recompiling of both source files.  During
  364. development, this could be tiresome if the files take a long time
  365. to compile.  A better way would be to type "gcc -c myprog1.c"
  366. which compiles myprog1.c into the object file "myprog1.o" (the -c
  367. switch tells gcc to make an object file), then to type "gcc -c
  368. myprog2.c" to generate myprog2.o, and finally to type "gcc -o
  369. myprog.exe myprog1.o myprog2.o".  This way, if you change only
  370. myprog1.c, you can recompile it and relink it with myprog2.o to
  371. create myprog.exe (skipping the "gcc -c myprog2.c" step).  This
  372. will be much faster if the source files take a long time to
  373. compile (or if you have a lot of source files).
  374.  
  375. Of course, doing all this typing is tiresome, too.  Also, if
  376. myprog1.c happens to depend on myprog1.h, and you change
  377. myprog1.h, you must recompile myprog1.c.  Thus, you have to keep
  378. track of all the file dependencies in order to know, after
  379. changing one header file, which other files need to be
  380. recompiled.
  381.  
  382. Fortunately, make takes care of all of this automatically.  All
  383. you have to do is create one text file that describes the various
  384. dependencies and the various steps to compile the program.  You
  385. name the text file "Makefile".  From then on, whenever you type
  386. "make", make examines the Makefile, looks for files which have
  387. changed since the last compile, recompiles any files which depend
  388. on the changed files, and relinks everything into a new
  389. executable.
  390.  
  391. For example, suppose that myprog.exe is made from myprog1.c and
  392. myprog2.c, that myprog1.c contains the lines "#include
  393. "myprog1.c"" and "#include "mainhead.h"", and that myprog2.c
  394. includes myprog2.h and mainhead.h.  The Makefile describing all
  395. of this is
  396.  
  397. myprog.exe: myprog1.o myprog2.o
  398.      gcc -o myprog.exe myprog1.o myprog2.o
  399.  
  400. myprog1.o: myprog1.c myprog1.h mainhead.h
  401.      gcc -c myprog1.c
  402.  
  403. myprog2.o: myprog2.c myprog2.h mainhead.h
  404.      gcc -c myprog2.c
  405.  
  406. The first line shows that myprog.exe depends on myprog1.o and
  407. myprog2.o.  If either of those has changed since the last time
  408. make was invoked, make will relink them to create myprog.exe by
  409. giving the command under the first line.  The fourth line shows
  410. that myprog1.o depends on myprog1.c, myprog1.h, and mainhead.h. 
  411. If any of these three files have changed since the last time make
  412. was run, make will recompile myprog1.o by issuing the command on
  413. line five.  It will also realize that myprog.o has changed, that
  414. myprog.exe depends on myprog.o, and will relink myprog.exe.  If
  415. mainhead.h is changed, make will recompile and relink everything
  416. since myprog1.o needs to be changed, myprog2.o needs to be
  417. changed, and thus myprog.exe needs to be changed.
  418.  
  419. The example above shows the general form of a Makefile.  You give
  420. a target (like "myprog.exe" or "myprog1.o") followed by a colon,
  421. followed by a space, followed by a space-delimited list of files
  422. the target depends on.  The next line specifies the action to be
  423. taken when any of the dependencies change:  the first character
  424. MUST be a tab (not just a bunch of spaces used for indentation);
  425. then you type the command make should issue.  A Makefile is just
  426. a list of such targets, dependencies, and actions.
  427.  
  428. 5.0 WHERE TO GET MORE INFORMATION
  429.  
  430. Unfortunately, the GNU C and C++ software-development system does
  431. not come with extensive, easy-to-use documentation like that you
  432. would get with, for example, Borland C++.  The info files (the
  433. ones you see when you use the hypertext reader) do not contain
  434. information on all the usual C library functions (like printf(),
  435. calloc(), fopen(), sin(), etc.).  develop.doc (in the emx\doc
  436. directory) does contain a partial list of library functions,
  437. including a list of headers you need to include, what the
  438. functions do, and what parameters they accept -- but it is not
  439. complete.  Moreover, some of the installation instructions are
  440. sketchy (which is why I wrote this document).
  441.  
  442. However, as mentioned previously, people frequently update this
  443. software (the original GNU software and the ports based on it),
  444. producing new versions and enhancements.  Thus, the documentation
  445. might be improved in the future.
  446.  
  447. Also, since the C compiler is ANSI C compliant (or at least close
  448. to it) and since the C++ compiler is very close to AT&T C++ 2.0,
  449. you can use just about any ANSI C and AT&T C++ 2.0 reference
  450. manuals.  I use the ones I got with an old version of Borland
  451. Turbo C++.  If you don't have such manuals, you should be able to
  452. find something suitable in a bookstore.  
  453.  
  454. Keep in mind that, even if you already have books on C and C++,
  455. you need an ANSI C language reference manual that contains a
  456. complete list of all the functions available in ANSI C (like
  457. printf(), calloc(), sin(), time(), etc.) including descriptions
  458. of the prototypes for the functions (like "double sin(double)"
  459. and "time_t time(time_t *)") and descriptions of which headers
  460. you need to include in order to use the functions (sin() requires
  461. math.h, and time() requires time.h, for example).  I recommend C: 
  462. A Reference Manual, by S. P. Harbison and G. L. Steele, Jr.
  463. (Prentice-Hall, 1991).  This book contains all the necessary
  464. information on library functions.
  465.  
  466. For those of you developing applications that use the PM or that
  467. use special OS/2 functions, the system DOES support many of the
  468. OS/2 API functions, including ones for semaphores, PM
  469. programming, named pipes, threads, etc.  See develop.doc (in the
  470. emx\doc directory) for a list of the supported functions.  (Also,
  471. see Appendix 1 for information on an optional package that
  472. enables you to use the full IBM OS/2 2.0 tool kit.)  The
  473. documentation does not contain a manual on how to use these API
  474. calls -- you need an OS/2 programming book for that.  For
  475. information on programming the PM, take a look at OS/2 2.0
  476. Presentation Manager GPI:  A Programming Guide to Text, Graphics,
  477. and Printing, by G. C. E. Winn (Van Norstrand-Reinhold, 1992); or
  478. Learning to Program OS/2 2.0 Presentation Manager by Example: 
  479. Putting the Pieces Together, by Stephen Knight (Van
  480. Norstrand-Reinhold, 1992).  [I  will add more titles when I find
  481. out more information.  Does anyone have recommendations for books
  482. on the OS/2 API in general, not just the PM?]
  483.  
  484. Also, way back when you were unarchiving, you might have been
  485. itching to examine the various readme files and other
  486. documentation.  Now is the time to do that to your heart's
  487. content.  Browse through readme.gpp and readme.gdb (both in the
  488. emx directory); readme.doc, install.doc, user.doc, and
  489. develop.doc (all in the emx/doc directory); and the information
  490. available from the hypertext reader.
  491.  
  492. 6.0 CONCLUSIONS
  493.  
  494. I wrote this to help people get started with a free -- yet
  495. powerful -- 32-bit C and C++ software-development system for
  496. OS/2.  For the price of a couple of books, you have a full C and
  497. C++ programming system.  For the additional price of an OS/2
  498. programming book, you have a bargain-basement SDK.
  499.  
  500. If you find errors in this document, or if you have suggestions
  501. for its improvement, please let me know.  My GEnie address is
  502. "BROOKE", and my Internet address is "brooke@hope.caltech.edu".
  503.  
  504. APPENDIX 1:  OPTIONAL PACKAGES
  505.  
  506. There are a few optional packages you can get for this
  507. software-development system, packages which are not necessary but
  508. which can nevertheless be important.
  509.  
  510. The first is emacs, the GNU programmer's editor.  As mentioned
  511. earlier, this is one of the two most popular editors for UNIX,
  512. and it is very popular on many other operating systems as well. 
  513. An interesting feature of GNU emacs is that you can use it to
  514. interact both with the info files (the ones used by the hypertext
  515. reader) and with the debugger.  This latter ability provides
  516. fully-interactive debugging, similar to what MicroSoft's CodeView
  517. or Borland's Integrated Development Environment offers.  To use
  518. emacs, you need the files "emacs.doc" and "emacsbin.zoo" (or
  519. "emacbin1.zoo", "emacbin2.zoo", etc., which contain the same
  520. files but which are a collection of smaller archives instead of
  521. one large archive).  The source code is available in
  522. "emacssrc.zoo" and "emacspat.zoo".  On ftp-os2.nmsu.edu, these
  523. files are available in pub/os2/2.0/gnu/emacs.
  524.  
  525. The second is a package that allows you to use IBM's OS/2 tool
  526. kit.  You still have to buy the tool kit from IBM, but it is
  527. probably cheaper than buying their entire software-development
  528. kit.  With this package and IBM's tool kit, you have full use of
  529. all OS/2 API functions.  This package is available in the file
  530. "icc2gcc.zoo".  On ftp-os2.nmsu.edu, this file is available in
  531. pub/os2/2.0/programming/emx-0.8d.
  532.  
  533. The third package contains full source code to all the programs
  534. and libraries that come with the software-development system. 
  535. The source (and the full collection of auxiliary programs) for
  536. the hypertext reader is in the file "gnuinfo.zoo", available on
  537. ftp-os2.nmsu.edu in the pub/os2/2.0/gnu directory.  The source
  538. for make comes in gnumk362.zoo, and the names of the archives for
  539. all the other sources in the system are given in readme.doc. 
  540. (readme.doc is in the emx\doc directory.)  The latter archives
  541. are available on ftp-os2.nmsu.edu in
  542. pub/os2/2.0/programming/emx-0.8d and on
  543. rusinfo.rus.uni-stuttgart.de in pub/os2/emx-0.8d.
  544.  
  545. APPENDIX 2:  FREQUENTLY ASKED QUESTIONS
  546.  
  547. This is such a common question concerning gcc (the compiler) that
  548. I figured I should answer it from the start:  "What's wrong with
  549. printf()?"  People find that printf() doesn't immediately echo to
  550. the screen; the string is held in a buffer and dumped later,
  551. usually long after the printf() statement is executed.  This is
  552. not really a bug -- ANSI C does not specify that printf() should
  553. flush the I/O buffer (since it is probably more efficient on
  554. mainframe systems with terminals to flush the I/O buffer only by
  555. large chunks at a time).  So, to get a printf() to work like you
  556. are probably accustomed, put an fflush(stdout) after any printf()
  557. you want immediately displayed.
  558.  
  559. APPENDIX 3:  SOURCES OF DISTRIBUTION
  560.  
  561. This document already described some places from which you can
  562. get the necessary archives:  ftp-os2.nmsu.edu,
  563. rusinfo.rus.uni-stuttgart.de, GEnie, and perhaps CompuServe and
  564. other on-line services.  However, some people don't have access
  565. to these sites, don't have modems fast enough to download
  566. megabytes of data in a reasonable amount of time, or can't afford
  567. the charges which they might incur by downloading from on-line
  568. services.  For these people, I am including the following list of
  569. people willing to distribute the whole system through regular
  570. mail.
  571.  
  572. If you would like to get on this list, just send me your name, a
  573. description of how people can contact you, and how much money you
  574. want for the service (such as "cost of disks and shipping",
  575. "disks + shipping + $30", or whatever you want to charge).  It
  576. would be helpful to have a list of five to ten people so that
  577. people can try another source if they can't contact one of them.
  578.  
  579. Folks, please consider what price would be sufficient for you to
  580. provide this service.  Even if you don't want to do it unless
  581. someone pays you $30, it might be helpful.  You might feel uneasy
  582. about charging money, but someone who can't get the system any
  583. other way might be VERY glad that you provide the service at all. 
  584.  
  585. Here's the list so far.  Keep in mind that people might change
  586. their prices, cease distributing the software, move, etc., so
  587. contact them first to find out details.
  588.  
  589. Brooke Anderson
  590. 1155 E. Del Mar #312
  591. Pasadena, CA  91106
  592. USA
  593. phone:  (818) 577-7555
  594. GEnie address:  BROOKE
  595. Internet address:  brooke@hope.caltech.edu
  596. Cost:  disks + shipping + $5
  597.  
  598. Doug Robison
  599. 1311 Webster
  600. Chillicothe, MO  64601
  601. USA
  602. phone:  (816) 646-1085
  603. GEnie address:  D.ROBISON
  604. Cost:  disks + shipping + $5
  605.  
  606.  
  607.                              The End 
  608.