A very simple C++ library for download pdb, get rva of function, global variable and offset from struct.
std::string ntos_path = std::string(std::getenv("systemroot")) + "\\System32\\ntoskrnl.exe";
ez::pdb ntos_pdb = ez::pdb(ntos_path);
if (ntos_pdb.init())
{
int rva_ntclose = ntos_pdb.get_rva("NtClose");
printf("nt!NtClose = %x\n", rva_ntclose);
}