I just tried it and found the same thing.  The problem is (apparently) g++ does not
allow "casts" except to the value 0.   CheckDupLines.c has two places where that
error occurs -- line 23 and 28.  I am not sure that it is a bug in g++ or some new
definition about casting I don't know about.  Furthermore, I do not know if there
is a way to cast (-1) or (~0UL) to a void* type.  This is the value returned by
JudyHSIns() when a malloc() error occurs (and the check is done in the JHSI()

Perhaps somebody has that answer.

Anyway, thanks for you input.
Doug Baskins <dougbaskins@yahoo.com>

----- Original Message ----
From: Mike Eynon <gonzobreath@yahoo.com>
To: judy-devel@lists.sourceforge.net
Sent: Friday, July 13, 2007 11:57:51 PM
Subject: CheckDupLines not compiling with gcc

Before I spend too much time sorting this out, I thought I would post a quick message to see if anyone has gone through this exersize before me.

I just downloaded Judy 1.0.4 and am running with:

[gonzo@innovator2 test]$ more /proc/version
Linux version 2.6.19-1.2911.6.5.fc6 (brewbuilder@ls20-bc1-14.build.redhat.com) (
gcc version 4.1.1 20070105 (Red Hat 4.1.1-51)) #1 SMP Sun Mar 4 16:41:13 EST 2007

On your garden variety 32 bit Intel box.

When I try using g++ (instead of gcc which works) to build CheckDupLines.cpp... I get the following error:

[gonzo@innovator2 test]$ pwd
[gonzo@innovator2 test]$ g++ CheckDupLines.cpp -lJudy
CheckDupLines.cpp: In function ˇint main()˘:
CheckDupLines.cpp:28: error: invalid conversion from ˇvoid*˘ to ˇlong unsigned int*˘

I have tried casts in an attempt to placate the compiler, but this causes even more problems within the macros that make up JSHI.

Has someone gone through this already?  If not, I am sure I can figure it out.


Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.

This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Judy-devel mailing list