I'm trying to compile the sorting library from http://www.yendor.com/programming/sort/
Direct Link to library: http://www.yendor.com/programming/sort/sort-all.tgz
When I run make the compiler says:
gcc -g -O -DCUTOFF=15 -c sorttest.c
In file included from sorttest.c:15:
sort.h:66: error: conflicting types for ‘heapsort’
/usr/include/stdlib.h:301: error: previous declaration of ‘heapsort’ was here
make: *** [sorttest.o] Error 1
Can someone help with this issue?
Frosty,
Well, the compiler is complaining that the type heapsort
is already defined at line 301
in /usr/include/stdlib.h
... the traditional methods for dealing with these issues are :
myheapsort
should do nicely. (and yes you can modify sort-all.tgz
, coz it's published under GNU GPL)heapsort
using #def #ifndef (if you can't change your code).stdlib
s (at least) where created equal. Sigh.Hope that helps.