My 2c, which is not authoritative but perhaps can throw a few more topics into the mix. First remember this: there are compiler-specific versions of libstdc++, incompatible but nevertheless named the same, dependent upon the exception method deployed by the compiler. AFAIK the only way to force a user to find only the (shared lib) version of libstdc++ you designate is to include this where the .exe resides and to run the program from that directory (since you can't count on the path being set).
If a program is linked with static libgcc, again AFAIK, libgcc is a dead end and doesn't need more support except what is commonly available, i.e. in windows/system32/... So a library built in the same manner will be using its own copies of libgcc routines and all of the names have been stripped, so there would be no clashes. If one of the libs used shared libgcc thats ok too, and libstd++ will use that instead of loading its own. On Tue, Mar 31, 2015 at 7:02 AM, Cosmin Apreutesei <cosmin.apreute...@gmail.com> wrote: > Hi, > > I'm looking for the best way to distribute binaries for a main exe and > several C and C++ plugins separately and I have a few questions about > linking libgcc and libstdc++. > > Currently, the main exe (a C program) is linked with static-libgcc. > Several C libraries that are loaded via LoadLibrary() are linked with > static-libgcc too. > > Is this setup supported? I.e. does libgcc have initialization or > shared globals that require it to be always linked dynamically or am I > ok to link it statically into multiple shared libraries like that? > > What happens if I also load a C++ library next? A C++ library will > pull in libstdc++ which will pull in a shared libgcc. Am I still on > solid ground here? Basically now I have libgcc statically linked into > the main exe _and_ dynamically linked from libstdc++. > > Good or no good? > > Thank you, > Cosmin. > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public