I would suggest the GNU MP library that uses the Miller-Rabin algorithm. I have used it for a few months and it's very fast.
Specifically, the function mpz_probab_prime_p does this, you can also use another function mpz_nextprime to find the next prime number greater than a number. I can post code samples if you would like.