0

I've been porting a C++ program from Linux to Cygwin on Windows, and am having trouble with Boost 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)

1 Answers1

0

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.

pg1989
  • 1,010
  • 6
  • 13
  • I thought about that, and it wouldn't take me too long to write my own command line option parser, but Boost is (in theory) already ported, though I've heard that some people have trouble with Program Options under Cygwin. I'd like to know if there's an accepted workaround for this case. – BruceIV Sep 09 '11 at 13:01