Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2005-04-16 08:13:34


Hi,
    having tried out bcp in WinXp I was fooled for some time by not entering
the correct boost path at the command line, when the app silently fails.
Therefore I wonder if testing for invalid boot path would improve things.
Something like the following patch in cpp_main in file main.cpp seems to work:

cpp_main(int argc, char* argv[])
....

   else if(0 == std::strncmp("--boost=", argv[i], 8))
      {
        const char* boost_path = argv[i] + 8;
        if(boost::filesystem::exists(boost_path)){
          papp->set_boost_path(boost_path);
        }
        else{
            std::string msg("ERROR boost path : ");
            msg += boost_path
            msg += " is invalid\n";
            throw std::runtime_error(msg);
            return 0;
        }
      }

...

}

regards
Andy Little


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk