|
Boost Users : |
From: Ebbe Kristensen (ebbe_at_[hidden])
Date: 2006-08-15 04:39:25
Edward Diener wrote:
> I know others disagree but my general suggestion is that if you have a
> statically linked library in your final EXE that all libraries should
> be statitically linked, else all libraries should be shared ( DLLs
> under Windows ). I have found over the years that mixing statically
> linked libraries and shared libraries is the biggest non-programming
> headache for programmers, outside of poor or missing documentation.
It wasn't a library problem.
I have now narrowed it down to a single .cpp file. If the condition in the
following function is enabled, printing the help text crashes:
void ParseParm()
{
string Something = "One,two,three";
typedef tokenizer< char_separator<char> > MyTokenizer;
char_separator<char> sep( "," );
MyTokenizer tokens( Something, sep );
unsigned int Row = 0;
MyTokenizer::iterator row_iter;
#ifdef ENABLE_FAIL
for( row_iter = tokens.begin(); row_iter != tokens.end(); ++row_iter,
++Row )
{
}
#endif
}
This function is *not* called anywhere in the program, its mere presence is
enough to make the program fail. Seems like a Borland compiler/linker error
to me but then I haven't tried this with other tool chains.
Ebbe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net