
Hey guys, I am using boost::serialization from 1.44.0. One thing that I noticed is that linking statically to the serialization libs will add several hundred exports in the final exe file that I get. Using `dumpbin /exports my_program.exe` Here's a brief illustration: Let's say we have a typical Hello World program (code example at the end of this message) that uses `iostream`. Here's what we get when we run `dumpbin /exports my_program.exe`. Dump of file my_program.exe File Type: EXECUTABLE IMAGE Summary 4000 .data 2000 .pdata 7000 .rdata 1000 .rsrc 18000 .text However, if we just add 6 lines of code to include boost::serialization (code example at the end of this message), we would get tons of exports. Dump of file my_program.exe File Type: EXECUTABLE IMAGE Section contains the following exports for my_program.exe 00000000 characteristics 4CA376FA time date stamp Thu Sep 30 01:27:22 2010 0.00 version 1 ordinal base 14 number of functions 14 number of names ordinal hint RVA name 1 0 00029480 ??_B?1??get_instance@?$singleton@V?$map@Vtext_oarchive@archive@boost@@@?A0xca82ee40@detail@archive@boost@@@serialization@boost@@CAAEAV?$map@Vtext_oarchive@archive@boost@@@?A0xca82ee40@detail@archive@3@XZ@51 = ??_B?1??get_instance@?$singleton@V?$map@Vtext_oarchive@archive@boost@@@?A0xca82ee40@detail@archive@boost@@@serialization@boost@@CAAEAV?$map@Vtext_oarchive@archive@boost@@@?A0xca82ee40@detail@archive@3@XZ@51 (`private: static class boost::archive::detail::`anonymous namespace'::map<class boost::archive::text_oarchive> & __cdecl boost::serialization::singleton<class boost::archive::detail::`anonymous namespace'::map<class boost::archive::text_oarchive> >::get_instance(void)'::`2'::`local static guard'{2}') 2 1 000294B0 ??_B?1??get_instance@?$singleton@V?$multiset@PEBVextended_type_info@serialization@boost@@Ukey_compare@detail@23@V?$allocator@PEBVextended_type_info@serialization@boost@@@std@@@std@@@serialization@boost@@CAAEAV?$multiset@PEBVextended_type_info@serialization@boost@@Ukey_compare@detail@23@V?$allocator@PEBVextended_type_info@serialization@boost@@@std@@@std@@XZ@51 = ??_B?1??get_instance@?$singleton@V?$multiset@PEBVextended_type_info@serialization@boost@@Ukey_compare@detail@23@V?$allocator@PEBVextended_type_info@serialization@boost@@@std@@@std@@@serialization@boost@@CAAEAV?$multi ...elided This is indeed very strange since compiling a `exe` file shouldn't get me any of these "exports" at all. Anyone has an idea what's going wrong? I am using MSVS2005 Release|x64. I compiled boost with `bjam threading=multi link=static runtime-link=static toolset=msvc-8.0`. Thank you for guidance in advance! Best regards, Chris Yuen // Source code to my_program.exe #include <iostream> #include <sstream> // Uncommenting the following block would introduce tons of // exports in the final exe. Even though this block of code // is never executed. //#include <boost/archive/text_oarchive.hpp> //void nothing() { //std::stringstream stream; //boost::archive::text_oarchive oa(stream); //} int main() { using namespace std; std::cout << "Hello World" << std::endl; return 0; }