I am attempting to compile the example given at http://judy.sourceforge.net/doc/JudySL_3x.htm#JSLG. I have downloaded, configure
'd, make
'd, and sudo make install
'd the Judy library as per the distribution. However, when I compile (GCC on a Mac), I receive the following errors:
Undefined symbols:
"_JudySLFreeArray", referenced from:
_main in ccziTK43.o
"_JudySLNext", referenced from:
_main in ccziTK43.o
"_JudySLIns", referenced from:
_main in ccziTK43.o
"_JudySLFirst", referenced from:
_main in ccziTK43.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Can Anyone point Me in the direction of information on how to resolve this? (Just for the record, the file being compiled is a C module, yes.)
Also, My command is simply gcc test.c
.
You need to tell gcc
to link against the Judy library, using the -l
option -- e.g.
gcc -lJudy test.c