home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / programm / 4285 < prev    next >
Encoding:
Text File  |  1992-08-17  |  27.1 KB  |  619 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:  Latest manual for getting/installing/using EMX port of GNU C/C++
  5. Message-ID: <1992Aug17.205109.12450@cco.caltech.edu>
  6. Sender: news@cco.caltech.edu
  7. Nntp-Posting-Host: kanga
  8. Organization: California Institute of Technology, Pasadena
  9. Date: Mon, 17 Aug 1992 20:51:09 GMT
  10. Lines: 607
  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, 8/11/92
  17.  
  18. Brooke Anderson
  19. 1155 E. Del Mar #312
  20. Pasadena, CA  91106
  21. USA
  22. Phone:  (818) 577-7555
  23. GEnie:  BROOKE
  24. Internet:  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.  On
  148. 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
  253. CPLUS_INCLUDE_PATH=C:/apps/emx/include.cpp;C:/apps/emx/include
  254.  
  255. IMPORTANT:  you need to use forward slashes ("/") and not
  256. backward slashes ("\") in the previous three lines.  Do NOT use
  257. forward slashes in your libpath statement.
  258.  
  259. Now, reboot your machine so that these definitions take effect. 
  260. Then go into the emx\lib\misc directory and type "make", and
  261. finally go into the emx\lib\math directory and type "make". 
  262. These last two actions update some libraries, and you must make
  263. sure you rebooted the machine once before executing the make
  264. commands.
  265.  
  266. This completes the installation process.
  267.  
  268. 4.0 HOW TO USE IT
  269.  
  270. Now, you are ready to use info (the hypertext reader), to compile
  271. programs, to debug programs, and to use make.  The next
  272. subsections discuss each of these actions in turn.
  273.  
  274. 4.1 USING INFO
  275.  
  276. Go into the directory in which info.exe resides.  Type "info". 
  277. You are now looking at a screen that has some information on the
  278. top half (information such as "Typing 'd' returns here, 'q'
  279. quits, '?' lists all info commands, 'h' gives a primer for
  280. first-timers . . .") and a list of subjects near the bottom
  281. (subjects such as "Info", "Gcc", "Gdb", "Make", "Gdbint", and
  282. "Cpp".).  
  283.  
  284. Go ahead and type "h" for a tutorial.  The most basic functions
  285. to remember are:  type "q" to quit, type "?" to get a list of
  286. commands, hit the space bar or PgDn key to go down a page, press
  287. the Del key or the PgUp key to go up a page, press "n" to go to
  288. the next node (think of a node as being a collection of one or
  289. more pages dealing with a single topic), press "p" to go to the
  290. previous node, use the up and down arrow keys to highlight
  291. choices of new nodes to jump to, and press enter to jump to the
  292. highlighted node.
  293.  
  294. Just play around with it a little while, and you will get the
  295. hang of it.  Type "d" to get back to the main directory, use the
  296. down arrow to highlight "Gcc", press enter, press the down arrow
  297. to highlight "Contributors", press enter, scan through the pages
  298. of text by hitting the PgDn key a couple of times, type "?" to
  299. see a list of commands, type "p" a couple of times, etc.
  300.  
  301. You can also read the info files with emacs.  See Appendix 1 for
  302. details.
  303.  
  304. 4.2 USING THE COMPILER
  305.  
  306. To compile a C source file called "myprog.c", type "gcc -o
  307. myprog.exe myprog.c".  The -o switch tells gcc that it should
  308. call the resulting executable "myprog.exe".  To compile the C++
  309. source file "myprog.cc", type "gcc -o myprog.exe myprog.cc
  310. -lgpp".  C++ source files should have the extension ".cc".  The
  311. -lgpp switch tells gcc to link the C++ libraries.  You can also
  312. tell gcc to optimize your code by using the -O switch.  There are
  313. two levels of optimization (-O and -O2, the highest being -O2). 
  314. Thus, for the fastest-executing code (at the expense of time to
  315. compile and of size of the executable), you would type "gcc -O2
  316. -o myprog.exe myprog.c" for myprog.c and "gcc -O2 -o myprog.exe
  317. myprog.cc -lgpp" for myprog.cc.
  318.  
  319. Note:  Specifying "-o myprog.exe" is important.  If you don't
  320. specify ".exe" as the suffix of the output file name, the
  321. compiler will generate a UNIX-style executable which will not run
  322. under OS/2 even if you subsequently rename the file so that it
  323. has a .exe extension.
  324.  
  325. 4.3 USING THE DEBUGGER
  326.  
  327. To debug a program, you need to compile it with the -g switch: 
  328. "gcc -g -o myprog.exe myprog.c" for myprog.c and likewise for
  329. myprog.cc.  After compiling, you then type "gdb myprog.exe" to
  330. start the debugger.  Type "h" at the debugger prompt to get a
  331. list of help topics.  gdb supports all sorts of breakpoints
  332. (including conditional ones), and you can watch variables, set
  333. variables to different values, etc.  For example, to get help on
  334. running programs from within the gdb, you can type "help
  335. running".  That will give you a list of commands such as run,
  336. kill, step, etc.  You can get help on individual commands by
  337. typing, for example, "help step".
  338.  
  339. The following is a sample compile and debug session.  Go into the
  340. emx\test directory and type "gcc -g -o hello.exe hello.cc -lgpp"
  341. to compile hello.cc.  Type "hello" to run it, to see if the
  342. compiler is functioning.  The program will print "Hello, world!"
  343. on the screen.  Now type "gdb hello.exe" to start gdb.  At the
  344. prompt "(gdb)", type "list main" to list the function "main". 
  345. Then type "break 5" to cause execution to stop at line 5 in the
  346. main function.  Type "run" to start execution -- it will stop at
  347. line 5.  Type "print argc" to see the value of the variable
  348. "argc".  Type "step" to run line 5 then halt execution at the
  349. next line.  Type "quit" to quit.  To list a function (main(),
  350. say) that is longer than a screenful, type "list main"; then type
  351. "list" again to list the next screenful of main.
  352.  
  353. You can run the debugger interactively from within emacs, too. 
  354. This arrangement provides a more visual system similar to
  355. MicroSoft's CodeView or Borland's Integrated Development
  356. Environment.  See Appendix 1 for details.
  357.  
  358. 4.4 USING MAKE
  359.  
  360. Assume you have a program made of the following source files: 
  361. "myprog1.c" and "myprog2.c".  You might manually compile these
  362. files by typing "gcc -o myprog.exe myprog1.c myprog2.c".  Of
  363. course, if you change only one of the files, typing such a
  364. command causes the recompiling of both source files.  During
  365. development, this could be tiresome if the files take a long time
  366. to compile.  A better way would be to type "gcc -c myprog1.c"
  367. which compiles myprog1.c into the object file "myprog1.o" (the -c
  368. switch tells gcc to make an object file), then to type "gcc -c
  369. myprog2.c" to generate myprog2.o, and finally to type "gcc -o
  370. myprog.exe myprog1.o myprog2.o".  This way, if you change only
  371. myprog1.c, you can recompile it and relink it with myprog2.o to
  372. create myprog.exe (skipping the "gcc -c myprog2.c" step).  This
  373. will be much faster if the source files take a long time to
  374. compile (or if you have a lot of source files).
  375.  
  376. Of course, doing all this typing is tiresome, too.  Also, if
  377. myprog1.c happens to depend on myprog1.h, and you change
  378. myprog1.h, you must recompile myprog1.c.  Thus, you have to keep
  379. track of all the file dependencies in order to know, after
  380. changing one header file, which other files need to be
  381. recompiled.
  382.  
  383. Fortunately, make takes care of all of this automatically.  All
  384. you have to do is create one text file that describes the various
  385. dependencies and the various steps to compile the program.  You
  386. name the text file "Makefile".  From then on, whenever you type
  387. "make", make examines the Makefile, looks for files which have
  388. changed since the last compile, recompiles any files which depend
  389. on the changed files, and relinks everything into a new
  390. executable.
  391.  
  392. For example, suppose that myprog.exe is made from myprog1.c and
  393. myprog2.c, that myprog1.c contains the lines "#include
  394. "myprog1.c"" and "#include "mainhead.h"", and that myprog2.c
  395. includes myprog2.h and mainhead.h.  The Makefile describing all
  396. of this is
  397.  
  398. myprog.exe: myprog1.o myprog2.o
  399.      gcc -o myprog.exe myprog1.o myprog2.o
  400.  
  401. myprog1.o: myprog1.c myprog1.h mainhead.h
  402.      gcc -c myprog1.c
  403.  
  404. myprog2.o: myprog2.c myprog2.h mainhead.h
  405.      gcc -c myprog2.c
  406.  
  407. The first line shows that myprog.exe depends on myprog1.o and
  408. myprog2.o.  If either of those has changed since the last time
  409. make was invoked, make will relink them to create myprog.exe by
  410. giving the command under the first line.  The fourth line shows
  411. that myprog1.o depends on myprog1.c, myprog1.h, and mainhead.h. 
  412. If any of these three files have changed since the last time make
  413. was run, make will recompile myprog1.o by issuing the command on
  414. line five.  It will also realize that myprog.o has changed, that
  415. myprog.exe depends on myprog.o, and will relink myprog.exe.  If
  416. mainhead.h is changed, make will recompile and relink everything
  417. since myprog1.o needs to be changed, myprog2.o needs to be
  418. changed, and thus myprog.exe needs to be changed.
  419.  
  420. The example above shows the general form of a Makefile.  You give
  421. a target (like "myprog.exe" or "myprog1.o") followed by a colon,
  422. followed by a space, followed by a space-delimited list of files
  423. the target depends on.  The next line specifies the action to be
  424. taken when any of the dependencies change:  the first character
  425. MUST be a tab (not just a bunch of spaces used for indentation);
  426. then you type the command make should issue.  A Makefile is just
  427. a list of such targets, dependencies, and actions.
  428.  
  429. 5.0 WHERE TO GET MORE INFORMATION
  430.  
  431. Unfortunately, the GNU C and C++ software-development system does
  432. not come with extensive, easy-to-use documentation like that you
  433. would get with, for example, Borland C++.  The info files (the
  434. ones you see when you use the hypertext reader) do not contain
  435. information on all the usual C library functions (like printf(),
  436. calloc(), fopen(), sin(), etc.).  develop.doc (in the emx\doc
  437. directory) does contain a partial list of library functions,
  438. including a list of headers you need to include, what the
  439. functions do, and what parameters they accept -- but it is not
  440. complete.  Moreover, some of the installation instructions are
  441. sketchy (which is why I wrote this document).
  442.  
  443. However, as mentioned previously, people frequently update this
  444. software (the original GNU software and the ports based on it),
  445. producing new versions and enhancements.  Thus, the documentation
  446. might be improved in the future.
  447.  
  448. Also, since the C compiler is ANSI C compliant (or at least close
  449. to it) and since the C++ compiler is very close to AT&T C++ 2.0,
  450. you can use just about any ANSI C and AT&T C++ 2.0 reference
  451. manuals.  I use the ones I got with an old version of Borland
  452. Turbo C++.  If you don't have such manuals, you should be able to
  453. find something suitable in a bookstore.  
  454.  
  455. Keep in mind that, even if you already have books on C and C++,
  456. you need an ANSI C language reference manual that contains a
  457. complete list of all the functions available in ANSI C (like
  458. printf(), calloc(), sin(), time(), etc.) including descriptions
  459. of the prototypes for the functions (like "double sin(double)"
  460. and "time_t time(time_t *)") and descriptions of which headers
  461. you need to include in order to use the functions (sin() requires
  462. math.h, and time() requires time.h, for example).  I recommend C: 
  463. A Reference Manual, by S. P. Harbison and G. L. Steele, Jr.
  464. (Prentice-Hall, 1991).  This book contains all the necessary
  465. information on library functions.
  466.  
  467. For those of you developing applications that use the PM or that
  468. use special OS/2 functions, the system DOES support many of the
  469. OS/2 API functions, including ones for semaphores, PM
  470. programming, named pipes, threads, etc.  See develop.doc (in the
  471. emx\doc directory) for a list of the supported functions.  (Also,
  472. see Appendix 1 for information on an optional package that
  473. enables you to use the full IBM OS/2 2.0 tool kit.)  The
  474. documentation does not contain a manual on how to use these API
  475. calls -- you need an OS/2 programming book for that.  For
  476. information on programming the PM, take a look at OS/2 2.0
  477. Presentation Manager GPI:  A Programming Guide to Text, Graphics,
  478. and Printing, by G. C. E. Winn (Van Norstrand-Reinhold, 1992); or
  479. Learning to Program OS/2 2.0 Presentation Manager by Example: 
  480. Putting the Pieces Together, by Stephen Knight (Van
  481. Norstrand-Reinhold, 1992).  [I  will add more titles when I find
  482. out more information.  Does anyone have recommendations for books
  483. on the OS/2 API in general, not just the PM?]
  484.  
  485. Also, way back when you were unarchiving, you might have been
  486. itching to examine the various readme files and other
  487. documentation.  Now is the time to do that to your heart's
  488. content.  Browse through readme.gpp and readme.gdb (both in the
  489. emx directory); readme.doc, install.doc, user.doc, and
  490. develop.doc (all in the emx/doc directory); and the information
  491. available from the hypertext reader.
  492.  
  493. 6.0 CONCLUSIONS
  494.  
  495. I wrote this to help people get started with a free -- yet
  496. powerful -- 32-bit C and C++ software-development system for
  497. OS/2.  For the price of a couple of books, you have a full C and
  498. C++ programming system.  For the additional price of an OS/2
  499. programming book, you have a bargain-basement SDK.
  500.  
  501. If you find errors in this document, or if you have suggestions
  502. for its improvement, please let me know.  My GEnie address is
  503. "BROOKE", and my Internet address is "brooke@hope.caltech.edu".
  504.  
  505. APPENDIX 1:  OPTIONAL PACKAGES
  506.  
  507. There are a few optional packages you can get for this
  508. software-development system, packages which are not necessary but
  509. which can nevertheless be important.
  510.  
  511. The first is emacs, the GNU programmer's editor.  As mentioned
  512. earlier, this is one of the two most popular editors for UNIX,
  513. and it is very popular on many other operating systems as well. 
  514. An interesting feature of GNU emacs is that you can use it to
  515. interact both with the info files (the ones used by the hypertext
  516. reader) and with the debugger.  This latter ability provides
  517. fully-interactive debugging, similar to what MicroSoft's CodeView
  518. or Borland's Integrated Development Environment offers.  To use
  519. emacs, you need the files "emacs.doc" and "emacsbin.zoo" (or a
  520. collection of smaller archives).  The source code is available in
  521. "emacssrc.zoo" and "emacspat.zoo".  On ftp-os2.nmsu.edu, these
  522. files are available in pub/os2/2.0/gnu/emacs.
  523.  
  524. The second is a package that allows you to use IBM's OS/2 tool
  525. kit.  You still have to buy the tool kit from IBM, but it is
  526. probably cheaper than buying their entire software-development
  527. kit.  With this package and IBM's tool kit, you have full use of
  528. all OS/2 API functions.  This package is available in the file
  529. "icc2gcc.zoo".  On ftp-os2.nmsu.edu, this file is available in
  530. pub/os2/2.0/programming/emx-0.8d.
  531.  
  532. The third package contains full source code to all the programs
  533. and libraries that come with the software-development system. 
  534. The source (and the full collection of auxiliary programs) for
  535. the hypertext reader is in the file "gnuinfo.zoo", available on
  536. ftp-os2.nmsu.edu in the pub/os2/2.0/gnu directory.  The source
  537. for make comes in gnumk362.zoo, and the names of the archives for
  538. all the other sources in the system are given in readme.doc. 
  539. (readme.doc is in the emx\doc directory.)  The latter archives
  540. are available on ftp-os2.nmsu.edu in
  541. pub/os2/2.0/programming/emx-0.8d and on
  542. rusinfo.rus.uni-stuttgart.de in pub/os2/emx-0.8d.  The source
  543. code to the libraries is available on GEnie.
  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:  BROOKE
  595. Internet:  brooke@hope.caltech.edu
  596. Cost:  disks + shipping + $5
  597.  
  598. Juergen Egeling
  599. Werderstr. 41
  600. 7500 Karlsruhe
  601. Germany
  602. Phone:  0721-373842
  603. FAX:  0721-373842
  604. BITNET:  ry90@dkauni2
  605. Internet:  ry90@ibm3090.rz.uni-karlsruhe.dbp.de
  606. X.400:  S=ry90;OU=ibm3090;OU=rz;P=uni-karlsruhe;A=dbp;C=de
  607. Cost:  disks + shipping + DM 25
  608.  
  609. Doug Robison
  610. 1311 Webster
  611. Chillicothe, MO  64601
  612. USA
  613. Phone:  (816) 646-1085
  614. GEnie:  D.ROBISON
  615. Cost:  disks + shipping + $5
  616.  
  617.  
  618.                              The End 
  619.