Closed bumbacoin closed 5 years ago
@bumbacoin The Swipp code base requires a C++11 compatible compiler. I think the error you are getting is caused by either the compiler not supporting C++11 or -std=c++11
missing as a compiler flag.
Try adding -std=c++11
to macx:QMAKE_CXXFLAGS
and see if that makes any difference.
it's already set in the .pro https://github.com/teamswipp/swippcore/blob/master/swipp.pro#L16
commenting this line allows it to be built https://github.com/teamswipp/swippcore/blob/0b64c6f9491ea16914c43186ba0c1aa8ef391955/src/net.cpp#L2021
static std::list<ComparableVersion> parse_releases(std::string result)
{
std::regex version_regex("<title>[-A-Za-z ]*([0-9]+\\.[0-9]+\\.[0-9]+(\\.[0-9]+)?)[-A-Za-z)( ]*</title>");
std::sregex_iterator iter(result.begin(), result.end(), version_regex);
std::sregex_iterator end;
std::list<ComparableVersion> versions;
while(iter != end)
{
versions.push_back(ComparableVersion((*iter)[1]));
++iter;
}
// versions.sort();
return versions;
}
@bumbacoin It also completely breaks the behavior of this function.
I can see the compiler is completely confused. Which compiler and version is this ?
$ clang -v
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
Thank you @bumbacoin. I will look into this. One more question though, which SDK version are you running ?
The commits outlined in https://github.com/teamswipp/swippcore/compare/ae92590d8...master should now have fixed this particular issue. The source code now fully compiles with Clang.
Furthermore, we have a new build system under development that will allow you to cross compile all Swipp binaries on a Linux distribution, see https://github.com/teamswipp/swippcore-buildsystem for further details.
Closing.
resulting error is
`In file included from ../src/net.cpp:7: In file included from ../src/init.h:10: In file included from ../src/wallet.h:10: In file included from ../src/walletdb.h:11: In file included from ../src/db.h:10: In file included from ../src/serialize.h:11: In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:439: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:702:71: error: invalid operands to binary expression ('const ComparableVersion' and 'const ComparableVersion') bool operator()(const _T1& __x, const _T1& y) const {return x < __y;}