pauldreik / rdfind

find duplicate files utility
Other
951 stars 77 forks source link

error compiling 'numberic_limits' is not a member of 'std' #127

Closed rbgnr111 closed 1 year ago

rbgnr111 commented 1 year ago

I got this error trying to compile:

g++ -DHAVE_CONFIG_H -I. -g -O2 -MT rdfind.o -MD -MP -MF .deps/rdfind.Tpo -c -o rdfind.o rdfind.cc rdfind.cc: In function ‘Options parseOptions(Parser&)’: rdfind.cc:225:30: error: ‘numeric_limits’ is not a member of ‘std’ 225 | o.maximumfilesize = std::numeric_limits<decltype(o.maximumfilesize)>::max(); | ^~~~~~ rdfind.cc:225:45: error: expected primary-expression before ‘decltype’ 225 | o.maximumfilesize = std::numeric_limits<decltype(o.maximumfilesize)>::max(); | ^~~~~~~ make[1]: *** [Makefile:656: rdfind.o] Error 1

I needed to edit rdfind.cc and add this line to resolve it:

include

after adding the include, everything appeared to work fine.

shr-project commented 1 year ago

This seems to be fixed in devel branch by https://github.com/pauldreik/rdfind/pull/85 and there is another PR to fix build with gcc-13 https://github.com/pauldreik/rdfind/pull/129

pauldreik commented 1 year ago

thanks, this is fixed on the main branch.