exit status 1 expected primary-expression before '.' token

EXACTLY which DHT library are you using? Have you tried the built-in examples that come with that library?