I want to write a program that gets a block header from the Litecoin client and increments the nonce until it finds a valid block. How do I do that?
C# is preferred however C, C++, python will do.
I'm looking for a library that gives me mining functionality
I would suggest Bitcoin.NET. It can make an RPC connection to your Litecoin/Bitcoin client and ask for a block header to work on.
Is it compatible with Litecoin
Bitcoin and Litecoin share a lot of code, including Remote Procedure Call, which is what Bitcoin.NET uses to talk to your *coin client. Note that the RPC port for Litecoin is 9332 instead of 8332, though.
How do I write a mining client with this?