$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: Edward Diener (eddielee_at_[hidden])
Date: 2006-08-14 12:27:07
Ebbe Kristensen wrote:
> I am developing a console program in Win32 using Borland C++ Builder 6 and 
> Boost 1.33.1.
> 
> I have a statically linked library that uses Boost tokenizer and regex. The 
> main program uses Boost function and program_options.
> 
> If my library is linked with the main program, the help output (generated by 
> program_options) crashes with a null pointer access. This happens even if 
> the library is not referenced in any way - it is enough just to link it in. 
> Remove the library from the link list and the problem disappears.
> 
> I'm fairly much out of ideas now so a bit of help would be very much 
> appreciated.
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.