|
Boost Users : |
From: Christopher Lux (christopherlux_at_[hidden])
Date: 2007-05-16 20:14:33
hi,
i compiled boost for windows using the msvc-8.0 and msvc-8.0_64 targets.
the following code works perfectly on debug builds but crashes on the
marked line in x64 mode and goes into an infinite loop in x86 mode.
i used visual studio 2005 with and without service pack 1 and even tried
the head version of boost. everytime the crash occurs.
int main(int argc, char **argv)
{
int width;
int height;
try {
boost::program_options::options_description cmd_options("program options");
cmd_options.add_options()
("help", "show this help message")
("width", boost::program_options::value<int>(&width)->default_value(1024), "output width")
("height", boost::program_options::value<int>(&height)->default_value(640), "output height");
boost::program_options::variables_map command_line;
***> boost::program_options::store(boost::program_options::parse_command_line(argc, argv, cmd_options), command_line);
boost::program_options::notify(command_line);
if (command_line.count("help")) {
std::cout << "usage: " << std::endl;
std::cout << cmd_options;
return (0);
}
winx = width;
winy = height;
}
catch (std::exception& e) {
std::cout << e.what() << std::endl;
return (-1);
}
}
thanks for your help
-chris
-- Christopher Lux | | Bauhaus University Weimar | Faculty of Media - Virtual Reality Systems Group
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net