Now realised that libp2c.a avoids many probs - so simplified it.