"cannot acces private member" Error with Compiling C++ Projects in VScode


When I try to compile a program from the Unreal Project Browser using VScode, the progress bar loads to 90% and I receive this error message:

'FHazardPointerCollection::FHazardRecord::FHazardRecord': cannot access private member declared in class 'FHazardPointerCollection::FHazardRecord'

I have all necessary C++ and C# VScode extensions, all necessary VS Build Tools C++ Development and .NET extensions, all necessary C++ and .NET SDKs and MinGW installed and set to work with VScode. I get the same error when I try to compile directly from VScode. Running either application as administrator does not help.

I have followed the steps of the official site to a tee, including directions on setting up IntelliSense with Unreal, but I am unable to generate C++ projects without incurring this error and there are no video tutorials on the matter.

Any guidance would be much appreciated! I desperately don’t want to have to use Visual Studio…

Thanks!

From what i seen other people with visual studio are getting the same issue as well when they update to latest version.

VS code most likely using the code as visual studio i guess, you can try an older version if that can help.

Just downgraded my version and yup-- it works.

Thanks for the solution! From the discussion you sent me it does seem like it’s just an issue with the latest vs updates. Hopefully an easier solution comes along, or the UE devs patch it soon.

1 Like

No worries :hugs:

But it kinda sad, i believe it from microsoft end, they said it was fixed on 17.9 and even close the issue from Developer Community but we still having the same issue.
The staff replied with:

So it suppose to be on 17.10.

Even windows update has a broken update since january for “KB5034441” am still waiting…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.