
Janusz Piwowarski wrote:
template<> void validator<string>::operator()(any& v, const vector<string>& xs) { .... }
Could you take a look if your 'build/Jamfile' mention that file? Yes, it mention it. Linker message:
..\..\. \bin\boost\libs\program_options\example\custom_syntax.exe\mingw\debu
g\custom_syntax.obj(.text$_ZNK5boost15program_options11typed_valueISsE5parse
ERNS_3anyERKSt6vectorISsSaISsEE+0x14): In function `Z7reg_fooRKSs':
D:/sources/boost/libs/program_options/example/../../../libs/program_options/
example/custom_syntax.cpp:22: undefined reference to `boost::program_options::validator<std::string>::operator()(boost::any&, std::vector<std::string, std::allocator<std::string> > const&)'
Ok, more ideas: 1. Could you remove all bin directories and rebuild? Maybe, somehow, library was not updated. 2. I presume you're using Boost.Build V1? Maybe, you can get preprocessed version of custom_syntax.cpp with bjam -n -sBUILD="gcc <cxxflags>-save-temps" and see if specialization for std::string is declared. Maybe, some other header is used. 3. Does mingw has a tool to look at content of library/object file? On linux, readelf might be used. If yes, it should be possible to look at content of value_semantic.obj, the library and the referring file to figure if necessary definition is provided. If there's no such tool, or you never used it, you can send me the files (off-list, to reduce traffic), and I'll take a look. - Volodya