Compilation error, ''uint' was not declared in this scope'
darcyabjones opened this issue · 1 comments
darcyabjones commented
Hi there.
Thanks for your work on this software.
I've been compiling xssp in a minimal docker container https://github.com/darcyabjones/pclust/blob/master/Dockerfiles/dssp.Dockerfile, and I came across the following compilation error. I just thought you'd like to know about it.
g++ -DHAVE_CONFIG_H -I. -std=c++11 -pedantic -Wall -Werror -Wno-reorder -pthread -I/usr/include -I./src/ -g -O2 -MT src/progress.o -MD -MP -MF $depbase.Tpo -c -o src/progress.o src/progress.cpp &&\
mv -f $depbase.Tpo $depbase.Po
src/progress.cpp: In member function 'void MProgressImpl::PrintDone()':
src/progress.cpp:120:3: error: 'uint' was not declared in this scope
uint width = get_terminal_width();
^~~~
src/progress.cpp:122:22: error: 'width' was not declared in this scope
if (msg.length() < width)
^~~~~
make[1]: *** [Makefile:687: src/progress.o] Error 1
I'm not a C++ developer, but i did some googling and it seems like uint
is depreciated in favour of unsigned int
in some distributions.
A simple typedef in progress.cpp solved the problem for me.
#ifndef uint
#define uint unsigned int
#endif
Hope this is helpful to someone