Fix exports and avoid using sources already linked on tests.

Review Request #127709 - Created April 22, 2016 and submitted

Andrius da Costa Ribas
dolphin, kdewin

Rework from scratch on Review Request - 123270

I'm currently unable to run ctest, but this fixes all inconsistent linkage errors and warnings on Windows (MSVC 2015 64-bit).

Hannah von Reth
Andrius da Costa Ribas
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit c6d4cae26343b3f9f390374b70668fde428853f0 by Andrius da Costa Ribas to branch master.