Hi Daniel,
currently, we're investigating an issue with exception handling and dynamically linked binaries. I expect this fixed until Monday. Also, I attached my simple test program and wonder if it reflects your use case. Mind the comment in target.mk.
Greets