
On Sep 24, 2004, at 8:11 AM, Vladimir Prus wrote:
The current regression test results show two similar failures of program_options on cw9.3
The situation is the following:
parsers.hpp contain:
template<class charT> basic_parsed_options<charT> parse_config_file(std::basic_istream<charT>&, const options_description&);
parsers.cpp contain:
template<class charT> basic_parsed_options<charT> parse_config_file(std::basic_istream<charT>& is, const options_description& desc) { ........ }
template BOOST_PROGRAM_OPTIONS_DECL basic_parsed_options<char> parse_config_file(std::basic_istream<char>& is, const options_description& desc);
And the linker can't find the explicitly instantinated function. This happens only in _dll tests, so I'd suspect a bug in the compiler/linker.
Can anybody sched the light on this?
How are clients (who can view only parsers.hpp) to know that: template<> basic_parsed_options<char> parse_config_file(std::basic_istream<char>& is, const options_description& desc); is a function to be imported from a DLL? Does adding to parsers.hpp something like: template<> __declspec(dllimport) basic_parsed_options<char> parse_config_file(std::basic_istream<char>& is, const options_description& desc); help? -Howard