X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbuilder.cpp;h=caf7fe54eb10bf4a618c750f0235fc61936ed425;hb=0a0a538e8500381a803f5ecd4168df2f4b2252b1;hp=15c9e5455f84e0946fc01ef8c569181063d79394;hpb=69ad3610053e140cb5108f53e4c46a0583e33559;p=builder.git diff --git a/source/builder.cpp b/source/builder.cpp index 15c9e54..caf7fe5 100644 --- a/source/builder.cpp +++ b/source/builder.cpp @@ -217,7 +217,7 @@ Target *Builder::get_header(const string &include, const string &arch, const str StringList argv; argv.push_back(get_architecture(arch).get_tool("CXX")); argv.push_back("--version"); - cxx_ver=Regex(" ([0-9.]+) ").match(run_command(argv))[1].str; + cxx_ver=Regex("[0-9]\\.[0-9.]+").match(run_command(argv))[0].str; while(!cxx_ver.empty() && !exists(Path("/usr/include/c++")/cxx_ver)) { unsigned dot=cxx_ver.rfind('.'); @@ -234,8 +234,6 @@ Target *Builder::get_header(const string &include, const string &arch, const str cout<<"Looking for include "<::const_iterator j=path.begin(); (!tgt && j!=path.end()); ++j) tgt=get_header(cwd/ *j/fn); for(list::const_iterator j=syspath.begin(); (!tgt && j!=syspath.end()); ++j) @@ -608,7 +608,10 @@ Target *Builder::get_library(const string &lib, const string &arch, const Path & if(mode!=ALL_STATIC) { if(arch=="win32") + { candidates.push_back("lib"+lib+".dll"); + candidates.push_back(lib+".dll"); + } else candidates.push_back("lib"+lib+".so"); }