solve: Compile error when g++ version is less than 5 #70
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Compile error when g++ version is less than 5
log:
[root@localhost lshw]# make make -C src all make[1]: 进入目录“/root/lshw/src” make -C core all make[2]: 进入目录“/root/lshw/src/core” g++ -g -Wall -g -I./core/ -DPREFIX=\"/usr\" -DSBINDIR=\"/usr/sbin\" -DMANDIR=\"/usr/share/man\" -DDATADIR=\"/usr/share\" -DVERSION=\"B.02.19.60\" -c hw.cc -o hw.o hw.cc: 在成员函数‘long long int hw::value::asInteger() const’中: hw.cc:2462:38: 错误:不能将‘long long int strtoll(const char*, char**, int)’的实参‘1’从‘std::string {aka std::basic_string<char>}’转换到‘const char*’ return strtoll(This->s, NULL, 0); ^ make[2]: *** [hw.o] 错误 1 make[2]: 离开目录“/root/lshw/src/core” make[1]: *** [core] 错误 2 make[1]: 离开目录“/root/lshw/src” make: *** [all] 错误 2