If you're on windows 10 you need to turn off the antivirus by going to the windows icon, opening settings, going to update and security, pressing windows security, opening virus & thread protection, pressing manage settings on virus & thread protection settings and disabling real time protection. Windows 10 AV like to flag everything, even dynamic load libraries so that happens