When I usually use code (include headers) from 3rd party (non-standard) C++ libraries, a pre-built binary file is linked to (or included in) the target executable that repre
In recent MinGW gcc/g++ versions (4.40) you can link against a shared dll rather than the default static library by using the flag -shared-libstdc++.
The static versions of the library are located in /mingw/lib/gcc/mingw32/[gcc version]. The file name is libstdc++.a. This will be linked in by default when compiling a c++ app with MinGW.