MSVC compiler has a nice feature - if you build DLL, all symbols should be resolved. After googling for a few hours, I didn't find the necessary combination of GCC flags, to achieve same result for shared libraries. So I created a custom builder based on ldd and c++filt utilities, which dumps unresolved symbols to a text file.

It is not the perfect solution, but it is good enough for me and may be it will be useful for you too.

As a side note: I had more luck with looking for such feature. Linker (at least on linux) has --no-undefined option which does exactly this. When you want to pass it to gcc or g++ you have to use -Wl,--no-undefined to indicate that option has to be passed to linker. - Tomasz Gajewski