home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / os2 / misc / 28857 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  2.9 KB

  1. Path: sparky!uunet!gatech!psuvax1!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340
  2. From: dic5340@hertz.njit.edu (David Charlap)
  3. Newsgroups: comp.os.os2.misc
  4. Subject: Re: GNU GCC 2.1
  5. Message-ID: <1992Sep1.133321.2063@njitgw.njit.edu>
  6. Date: 1 Sep 92 13:33:21 GMT
  7. References: <tdhnfmg.genie@netcom.com> <BtuqKr.2vF@acsu.buffalo.edu>
  8. Sender: news@njit.edu
  9. Organization: New Jersey Institute of Technology, Newark, N.J.
  10. Lines: 52
  11. Nntp-Posting-Host: hertz.njit.edu
  12.  
  13. In article <BtuqKr.2vF@acsu.buffalo.edu> oistony@ubvmsb.cc.buffalo.edu (Anthony M. Petro) writes:
  14. >i downloaded gcc 2.1 and installed it, and then installed the 2.2.2 
  15. >binaries over the 2.1 binaries.  according to the note in the 2.2.2 
  16. >directory, one needs only the files gccbin.zoo and gcclib.zoo to 
  17. >upgrade from 2.1; i found the content of gcclib.zoo to be identical to 
  18. >the ones provided by 2.1 and installed only the binaries.
  19. >
  20. >there are two text files entitled readme and install in the \doc 
  21. >directory (created by extracting the zoo files).  one of them, readme 
  22. >i believe, gives a few hints about using gcc in os/2, like not using 
  23. >the gcc linker but instead using link386.exe provided by os/2.
  24.  
  25. There is no gcc/2 linker.  That's why you must use link386.exe.
  26.  
  27. >the other file describes environment variables that must be 
  28. >initialized for proper gcc operation.  i copied these into my 
  29. >config.sys, rebooted, and was able to compile sample1.c and sample2.c.
  30.  
  31. OK.
  32.  
  33. >linking these with link386.exe gave me runnable executables.  however, 
  34. >i can't find any documentation on link386.exe.  when i linked 
  35. >sample1.o, link386 bitched that i didn't specify an executable file 
  36. >type or something like that, and warned that it was assuming the app 
  37. >was WINDOWSCOMPAT or something like that.  regardless, sample1.exe 
  38. >worked from an os/2 prompt, but "Hello world" isn't exactly a robust 
  39. >test.
  40.  
  41. You didn't specify an executable type.  Either include a "/PM:<type>"
  42. line on the link386 command line or (prefereably) linke with a .DEF
  43. file.
  44.  
  45. The executable type is assumed to be WINDOWCOMPAT if you don't specify
  46. one.  WINDOWCOMPAT means that it is a text-mode app which can run full
  47. screen or windowed.  The other types are NONWINDOWCOMPAT, which can
  48. only run in full-screen sessions, and WINDOWAPI, which is a PM app.
  49.  
  50. All these are specified in the .DEF file that is used by the linker
  51. (the fifth parameter to link386.exe).
  52.  
  53. >other than that i'm completely clueless.  does anyone have any 
  54. >documentation (or reference thereto) for link386.exe?
  55.  
  56. Documentation is on-line in the OS/2 Toolkit.  Descriptions of .DEF
  57. files are in almost any book on programming OS/2 (any version).
  58.  
  59. For a (very brief) syntax for link386, type "link386 /help"
  60. -- 
  61.    |)  David Charlap           "I don't even represent myself
  62.   /|_  dic5340@hertz.njit.edu   sometimes so NJIT is right out!.
  63.  ((|,)
  64.   ~|~  Hi! I am a .signature virus, copy me into your .signature file.
  65.