Re: OLC

From: Tel Janin Aellinsar (icarus@Loomis.Berkshire.NET)
Date: 03/30/96


On Sat, 30 Mar 1996, Blake Weaver wrote:

> I just installed the code from obuild.05.tar.gz into the base (unedited)
> code of circle bpl9.  I compiled with only one error...
> 
> in the line containing  zone_table[rnum].builders->name = strdup("x");
> 
> When compiled it says the 'strdup' is undefined or something.
> My question is...why?  and what should it be...or what file should
> I #include??

You can almost always determine which file to include like this:

pushd . ; cd /usr/include ; grep function `find -name \*.h` ; popd

The syntax of the find command seems to vary somewhat from system to 
system.  I'm pretty sure the above will work on Linux.  You can skip the 
pushd and popd if you aren't on a csh-type shell or don't care about not 
moving directories.  There's a way to do this with find, but I don't know 
what it is.

Also, if you know what strdup is supposed to look like, you can declare 
it yourself.  But if the error message is from ld about /tmp/cc0xx, 
you're out of luck and may have to write it yourself (try doing a #define 
strdup strcpy?).  Check your manual pages for strdup if you can.  Odds 
are that if there's no man page, your particular system doesn't support 
that function.  SunOS is particularly bad about this.  Their ANSI C 
compatability barely exists.

________________________________________________________________________
Tel Janin Aellinsar                       http://www.crocker.com/~icarus
McCoy Enterprises Corporation          Shayol Ghul Resort and Health Spa
Berserker Dragon, Knights of the Cosmos             icarus@BERKSHIRE.NET



This archive was generated by hypermail 2b30 : 12/07/00 PST