Search code examples
gccg++precompiled-headers

Trying to set up a pre-compiled header


fatal error: can't create precompiled header stdc++.h.gch: Permission denied

I'm getting the above error while using the command g++ -std=c++14 stdc++.h on windows powershell in the directory where stdc++.h is located. How do I fix this ?


Solution

  • Run Powershell as an administrator and it should work fine - you gain all permissions you need.