
I'm using VS2005 to compile a DLL that links with the MFC DLL and also the static Boost threads library. I've upgraded from Boost v1.34.1 to v1.37 and now the threads library's use of MSCRT's _pRawDllMain hook interferes with MFC's use of the hook to point to its _RawDllMain export. I've come up with a workaround of a library that exports _pRawDllMain and links to _RawDllMain in the MFC DLL and an export I've added to the threads library that calls its dll_callback() function. I just can't get the MS linker to cooperate. If I put my library ahead of the threads library in the command line the linker complains of a multiply-defined symbol. If I put the threads library ahead of my library the linker uses the threads library _pRawDllMain export and ignores mine. Only if I remove the _pRawDllMain export from the threads library entirely does the linker use mine. I would like to leave the _pRawDllMain export in the threads library so that it will still work in my library's absence but I can't figure out what makes it so attractive to the linker. I realize this isn't, strictly speaking, a Boost issue, but the problem arose because of a change to Boost and I know there are a lot of smart people here. :)> -evan