开发者

Hang using Boost Program Options under Cygwin

I've been porting a C++ program from Linux to Cygwin on Windows, and am having trouble with Boos开发者_运维技巧t Program Options (Boost 1.43). The program compiles and runs fine on Linux (Boost 1.44), but hangs under Cygwin:

/* prints */
std::cout << "positional options" << std::endl;

variables_map v;
store(command_line_parser(argc, argv)
    .options(o).positional(p).allow_unregistered().run(), v);

/* never prints */  
std::cout << "stored vars" << std::endl;

notify(v);

Any ideas? I can provide more information if needed. (If I had to guess, it's I/O blocked, as the CPU use sits at 0% here)


If I were you, I would go through it using GDB.

A word of warning though: Some things just can't be efficiently ported linux->cygwin, no matter how clever the hacking is. At a certain point, you need to ask yourself if it would actually save time to just rewrite it all on Windows.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜