Error with JSON when compile C++ in Windows.

Hi, I need help with an error in Unreal Engine 16.2 when I compile C++ with JSON.

I compiled the same project with Unreal Engine 16.2 in Gnu/Linux OS but when I compile in Windows I get error on all Json actions.

So, I commented all the lines as they have the same error except one.

TSharedPtr< FJsonObject > JsonObj = MakeShareable(new FJsonObject);

The error is:

any idea?, thanx! and regards.

In order for that to compile you need to do one of these:

TSharedRef< FJsonObject > JsonObj = MakeShareable(new FJsonObject);


TSharedPtr< FJsonObject > JsonObj = MakeShareable(new FJsonObject( ));

The semantics of C++ are lovely, aren’t they

Hi mittense, thank you for your reply.

I was able to solve the problem and the solution is to add modules in the build.cs
In my case, I added a line with Json and JsonUtilities.

But, I don’t understand why in Linux is not necessary.


2020 this stuff saved my life. Thank you !