cmakefilecompiler-errors

C Library Compile Error


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?


Solution

  • 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 :

    Hope that helps.