exit status 1 'dht' was not declared in this scope

what is wrong

exit status 1 'dht' was not declared in this scope

There's a problem in the code you haven't shown us. The full error message, that you also haven't shown us, contains useful information about this problem.

You're probably using the wrong DHT library or you've missed out the line defining "dht" or something somewhere is spelled wrong.

Steve