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
heapsortis already defined at line301in/usr/include/stdlib.h… the traditional methods for dealing with these issues are :myheapsortshould do nicely. (and yes you can modifysort-all.tgz, coz it’s published under GNU GPL)heapsortusing #def #ifndef (if you can’t change your code).stdlibs (at least) where created equal. Sigh.Hope that helps.