Hi,
thank you for trying it out.
The problem seems related to the Ubuntu version.
I confirm that the build works with 14.04, but it fails on Ubuntu 16.04 and 18.04.
I particular, I moved the object file from the working 14.04 machine to the 16.04 machine and the link stage failed.
I have used g++ 5.5.0 20171010 on both.
(The suggestion of duplicating the target_link_libraries function does not make a difference)