bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to compile hashlib.c for testing?


From: Chet Ramey
Subject: Re: How to compile hashlib.c for testing?
Date: Thu, 27 Dec 2018 13:27:18 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 12/26/18 4:31 PM, Peng Yu wrote:
> Hi,
> 
> I'd like to compile hashlib.c to try its main(). But I got the
> following error. What is the correct commands to compile it? Thanks.

Think about the error message:

>   "_xmalloc", referenced from:
>       _hash_create in hashlib.o
>       _hash_copy in hashlib.o
>       _hash_search in hashlib.o
>       _hash_insert in hashlib.o
>       _main in hashlib.o
> ld: symbol(s) not found for architecture x86_64

So you need a definition for xmalloc. The easiest thing to do is to add
an xmalloc function in the TEST_HASHING block, or you could follow the
directions in the comment there.

Sooner or later, you're going to have to pick this stuff up on your own.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]