home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / aix / 13613 < prev    next >
Encoding:
Text File  |  1993-01-21  |  2.7 KB  |  84 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!munnari.oz.au!metro!ipso!fawlty!stuart
  3. From: stuart@fawlty.towers.oz.au (Stuart Walker)
  4. Subject: Re: Compilation Quirks
  5. Organization: Tower Technology, Sydney
  6. Date: Thu, 21 Jan 1993 23:40:39 GMT
  7. Message-ID: <1993Jan21.234039.8515@fawlty.towers.oz.au>
  8. Sender: stuart@fawlty.towers.oz.au (Stuart Walker)
  9. Lines: 73
  10.  
  11.  
  12.  
  13. In a previous article, I wrote about the following problem...
  14. > I've been trying to compile some files using the external typechecking
  15. > options.  They seem to fail dismally on variable argument lists.
  16. > Here are the cut down files, and the commands used to compile them:
  17. > $ cat tst.c
  18. > #include <stdlib.h>
  19. > extern void TFB_Log_Msg (const char *, ...);
  20. > main()
  21. > {
  22. >         TFB_Log_Msg("hello");
  23. >         exit(1);
  24. > }
  25. > $ cat log.c
  26. > #include <stdio.h>
  27. > #include <stdlib.h>
  28. > #include <stdarg.h>
  29. > void
  30. > TFB_Log_Msg(const char *msg, ...)
  31. > {
  32. >         va_list args;
  33. >         char    tmp[2];
  34. >         char    bfr[150];
  35. >         va_start(args, msg);
  36. >         vsprintf(bfr, msg, args);
  37. >         va_end(args);
  38. > }
  39. > $ cc -c -qlanglvl=ansi -qextchk tst.c
  40. > $ cc -c -qlanglvl=ansi -qextchk log.c
  41. > $ cc -o tst tst.o log.o
  42. > 0706-317 ERROR: Unresolved or undefined symbols detected:
  43. >                  Symbols in error (followed by references) are
  44. >                  dumped to the load map.
  45. >                  The -bloadmap:<filename> option will create a load map.
  46. > .TFB_Log_Msg
  47. > $ cc -o log.o tst.o
  48. > 0706-317 ERROR: Unresolved or undefined symbols detected:
  49. >                  Symbols in error (followed by references) are
  50. >                  dumped to the load map.
  51. >                  The -bloadmap:<filename> option will create a load map.
  52. > .TFB_Log_Msg
  53. > The actual error seems to vary with the order of the files during the link.
  54. > I'd like to try to use the -bextchk if at all possible.  Any ideas anyone ??
  55. > PS This fails in exactly the same way for AIX 3.1.5 and 3.2.3
  56.  
  57. Well, I got a reply from Matthew Russotto at IBM(thanks Matthew) that apparently
  58. this problem does not occur on version 1.02.0000.00025(AIX 3.2) of the
  59. C compiler, and probably a few earlier versions.  On our 3.2 system, we only
  60. had version 1.02.0000.0000.
  61.  
  62. Stuart.
  63. _______________________________________________________________________________
  64. Internet: stuart@fawlty.towers.oz.au              Phone: +61 2 427 2999
  65. UUCP:     uunet!fawlty.towers.oz.au!stuart          Fax:   +61 2 427 7072
  66. Snail:    Tower Technology
  67. -- 
  68. _______________________________________________________________________________
  69. Internet: stuart@fawlty.towers.oz.au              Phone: +61 2 427 2999
  70. UUCP:     uunet!fawlty.towers.oz.au!stuart          Fax:   +61 2 427 7072
  71. Snail:    Tower Technology
  72.