Hi,
Pulled this from a larger application to isolate to the problem: -d
./tmp or -d "./tmp" doesn't go to directory string but is with the
positionals:
#include
#include <iostream>
#include <exception>
#include <string>
#include <cstring>
#include <memory>
#include <fstream>
#include "boost/program_options.hpp"
int main(int argc, char** argv) {
try {
boost::program_options::positional_options_description p;
p.add("input-file", -1);
std::string directory = "./";
boost::program_options::options_description visible("Allowed
options");
visible.add_options()
("input-file",
boost::program_options::valuestd::string>(), "input files
can be *.xml, *.pdb, *.mol2, *.mtz, *.cif, *.csv, and *.sdf. Csv and sdf
formats are for NMR calculations. csv lists the atoms for which the
shifts will be computed. 1st line containts the Header:
\"Chain\",\"Residue ID\",\"Sequence\",\"Atom Name\",\"Unbound
ppm\",\"Bound ppm\". Then atoms may be listed i.e
\"A\",\"MET\",231,\"CE\",10.30,10.50. sdf file contains the ligands for
a CSP calculation. ")
("directory,d",
boost::program_options::valuestd::string(&directory)->implicit_value("./"),
"Directory for publishing output.")
;
boost::program_options::options_description all("Allowed options");
all.add(visible);//.add(hidden);
boost::program_options::variables_map vm;
boost::program_options::store(boost::program_options::command_line_parser(argc,
argv).options(all).positional(p).run(), vm);
boost::program_options::notify(vm);
std::vectorstd::string fileList = vm["input-file"].as <
std::vector < std::string >> ();
for (unsigned int fileListIndex = 0; fileListIndex <
fileList.size(); fileListIndex++) {
std::cout<<" "<