predixy
predixy copied to clipboard
Compile error
/predixy # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.8.0
PRETTY_NAME="Alpine Linux v3.8"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"
/predixy # make
make[1]: Entering directory '/predixy/src'
g++ -std=c++11 -Wall -w -g -O3 -D_PREDIXY_BACKTRACE_ -D_EPOLL_ -c Logger.cpp
In file included from Logger.cpp:13:0:
Util.h: In member function 'void StrErrorImpl::set(int)':
Util.h:40:26: error: invalid conversion from 'int' to 'char*' [-fpermissive]
mStr = strerror_r(err, mBuf, sizeof(mBuf));
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:113: Logger.o] Error 1
make[1]: Leaving directory '/predixy/src'
make: *** [Makefile:13: default] Error 2
me too!
一样的问题。2年多了,问题还在。
make[1]: Entering directory '/predixy-1.0.5/src' g++ -std=c++11 -Wall -w -g -O3 -D_PREDIXY_BACKTRACE_ -D_EPOLL_ -c Crc16.cpp g++ -std=c++11 -Wall -w -g -O3 -D_PREDIXY_BACKTRACE_ -D_EPOLL_ -c HashFunc.cpp g++ -std=c++11 -Wall -w -g -O3 -D_PREDIXY_BACKTRACE_ -D_EPOLL_ -c Timer.cpp g++ -std=c++11 -Wall -w -g -O3 -D_PREDIXY_BACKTRACE_ -D_EPOLL_ -c Logger.cpp In file included from Logger.cpp:13: Util.h: In member function 'void StrErrorImpl::set(int)': Util.h:40:26: error: invalid conversion from 'int' to 'char*' [-fpermissive] 40 | mStr = strerror_r(err, mBuf, sizeof(mBuf)); | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ | | | int make[1]: Leaving directory '/predixy-1.0.5/src' make[1]: *** [Makefile:113: Logger.o] Error 1 make: *** [Makefile:13: default] Error 2
一样问题, ....