home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6191 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.6 KB  |  83 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: chang.unx.sas.com!walker
  3. From: walker@chang.unx.sas.com (Doug Walker)
  4. Subject: Re: Feeling very confused with SAS/C, NDK 3.1, etc.
  5. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  6. Message-ID: <DotxBJ.HqE@unx.sas.com>
  7. Date: Mon, 25 Mar 1996 15:21:19 GMT
  8. X-Nntp-Posting-Host: chang.unx.sas.com
  9. References: <1777.6656T1015T1276@mistral.co.uk>
  10. Organization: SAS Institute Inc.
  11.  
  12. In article <1777.6656T1015T1276@mistral.co.uk>,
  13. Adam Atkinson <ghira@mistral.co.uk> wrote:
  14. >I've had NDK 3.1 thanks to some magazine cover disks for a couple of years
  15. >now. Should I replace the SAS/C 6.56 includes with the NDK3.1 ones, or
  16. >would this be dangerous?
  17.  
  18. I don't know what is in the NDK (I've never seen it), but the include files
  19. provided with SAS/C fall into several categories:
  20.  
  21.    INCLUDE:#?.h         ==> ANSI and SAS/C library header files
  22.  
  23.    INCLUDE:SYS          ==> UNIX compatibility files
  24.  
  25.    INCLUDE:PRAGMAS      ==> SAS/C supplied #pragma statements for system
  26.                             library calls
  27.  
  28.    INCLUDE:PROTOS       ==> SAS/C supplied header files for each system
  29.                             library
  30.  
  31.    CXXINCLUDE:          ==> C++ header files
  32.  
  33.    everything else      ==> Commodore-supplied system header files
  34.  
  35. I can't see how replacing this structure with the NDK structure GAINS
  36. you anything.  You will probably LOSE the ability to do some things.
  37.  
  38. >Since I'm (currently) writing only for my own consumption, I might as well
  39. >ignore the ANSI stuff and only use the amiga versions of everything. (The
  40. >Guru book, for instance, says it's usually bad to mix the two)
  41.  
  42. Yes, and yes.
  43.  
  44. >Where should I put third party includes. I've copied all the MUI includes
  45. >etc. into the sensible places in my includes directory, but I don't know if
  46. >this is what I'm expected to do. It seems more convenient than leaving 3rd
  47. >party includes scattered all over the place and having to specify exact
  48. >paths for them all the time.
  49.  
  50. I suggest putting them somewhere else BESIDES in your SC:INCLUDE directory.
  51. The SC: directory should only include SAS/C-provided files, so if you need
  52. to reinstall the product, you will not have to figure out what parts came
  53. from the installation disks and what parts didn't.  You can make INCLUDE: 
  54. a multi-directory assign, or you can add the other directory to your SCOPTS 
  55. file with an INCLUDEDIRECTORY option.
  56.  
  57. >Should I construct a new GST to reflect my new setup? I was asked if I'd
  58. >like a big GST during the 6.50 setup, and I said yes. I get the impression
  59. >I may need to re-create it, but I'm really not sure.
  60.  
  61. Personally, I create a new GST for every project, and set up my make file to
  62. build it.  If you use the default GST, it will still work even if you add
  63. other header files, but it could be made faster if you include all the 
  64. headers you are likely to use.  BE CAREFUL when including headers: you cannot
  65. include header files that define functions or data.  An inline function DOES
  66. count as a function definition.  Data can be DECLARED in a header file that
  67. is included in a GST, but not DEFINED there.  A data declaration has the
  68. "extern" keyword on it and no initializer value.  You also need to be careful
  69. that the header included always defines things to the same value every time
  70. the file is compiled: i.e. the preprocessor can't change the way the file
  71. is compiled in different .c files.
  72.  
  73. There is more information on this in the GST section of the Library Reference
  74. Manual.
  75.  
  76. --Doug
  77. -- 
  78.   *****     
  79.  *|_o_o|\\     Doug Walker   walker@unx.sas.com  
  80.  *|. o.| ||                
  81.   | o  |//     Any opinions are mine, not those of SAS Institute, Inc.
  82.   ====== 
  83.