bug-bash
[Top][All Lists]
Advanced

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

How to compile hashlib.c for testing?


From: Peng Yu
Subject: How to compile hashlib.c for testing?
Date: Wed, 26 Dec 2018 15:31:03 -0600

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.

$ gcc  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"'
-DCONF_OSTYPE='"darwin17.7.0"'
-DCONF_MACHTYPE='"x86_64-apple-darwin17.7.0"' -DCONF_VENDOR='"apple"'
-DLOCALEDIR='"/usr/local/share/locale"' -DPACKAGE='"bash"' -DSHELL
-DTEST_HASHING -DHAVE_CONFIG_H -DMACOSX   -I.  -I. -I./include -I./lib
-I./lib/intl -I/Users/pengy/Downloads/bash-4.4/lib/intl  -g -O2
-Wno-parentheses -Wno-format-security -c hashlib.c
$ gcc -c hashlib.o  hashlib.exe
Undefined symbols for architecture x86_64:
  "_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
clang: error: linker command failed with exit code 1 (use -v to see invocation)

-- 
Regards,
Peng



reply via email to

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