I am trying to call a simple function from AccessControl.sol file of openzeppelin and the line of code is as below:
_setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
Now, when I compile the SC using hardhat or foundry in my VS code, I am reverted with an error that the function is not declared anywhere. Whereas, there no such error thrown on Remix IDE. It compiles just fine on Remix.
Can anyone help me understand how to resolve this issue