home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!munnari.oz.au!metro!ipso!fawlty!stuart
- From: stuart@fawlty.towers.oz.au (Stuart Walker)
- Subject: Re: Compilation Quirks
- Organization: Tower Technology, Sydney
- Date: Thu, 21 Jan 1993 23:40:39 GMT
- Message-ID: <1993Jan21.234039.8515@fawlty.towers.oz.au>
- Sender: stuart@fawlty.towers.oz.au (Stuart Walker)
- Lines: 73
-
-
-
- In a previous article, I wrote about the following problem...
- > I've been trying to compile some files using the external typechecking
- > options. They seem to fail dismally on variable argument lists.
- > Here are the cut down files, and the commands used to compile them:
- >
- > $ cat tst.c
- > #include <stdlib.h>
- >
- > extern void TFB_Log_Msg (const char *, ...);
- >
- > main()
- > {
- > TFB_Log_Msg("hello");
- > exit(1);
- > }
- >
- > $ cat log.c
- > #include <stdio.h>
- > #include <stdlib.h>
- > #include <stdarg.h>
- >
- > void
- > TFB_Log_Msg(const char *msg, ...)
- > {
- > va_list args;
- > char tmp[2];
- > char bfr[150];
- >
- > va_start(args, msg);
- > vsprintf(bfr, msg, args);
- >
- > va_end(args);
- > }
- >
- >
- > $ cc -c -qlanglvl=ansi -qextchk tst.c
- > $ cc -c -qlanglvl=ansi -qextchk log.c
- > $ cc -o tst tst.o log.o
- > 0706-317 ERROR: Unresolved or undefined symbols detected:
- > Symbols in error (followed by references) are
- > dumped to the load map.
- > The -bloadmap:<filename> option will create a load map.
- > .TFB_Log_Msg
- >
- > $ cc -o log.o tst.o
- > 0706-317 ERROR: Unresolved or undefined symbols detected:
- > Symbols in error (followed by references) are
- > dumped to the load map.
- > The -bloadmap:<filename> option will create a load map.
- > .TFB_Log_Msg
- >
- > The actual error seems to vary with the order of the files during the link.
- > I'd like to try to use the -bextchk if at all possible. Any ideas anyone ??
- >
- > PS This fails in exactly the same way for AIX 3.1.5 and 3.2.3
-
- Well, I got a reply from Matthew Russotto at IBM(thanks Matthew) that apparently
- this problem does not occur on version 1.02.0000.00025(AIX 3.2) of the
- C compiler, and probably a few earlier versions. On our 3.2 system, we only
- had version 1.02.0000.0000.
-
- Stuart.
- _______________________________________________________________________________
- Internet: stuart@fawlty.towers.oz.au Phone: +61 2 427 2999
- UUCP: uunet!fawlty.towers.oz.au!stuart Fax: +61 2 427 7072
- Snail: Tower Technology
- --
- _______________________________________________________________________________
- Internet: stuart@fawlty.towers.oz.au Phone: +61 2 427 2999
- UUCP: uunet!fawlty.towers.oz.au!stuart Fax: +61 2 427 7072
- Snail: Tower Technology
-