Use of undefined type 'IOnlineFriends'

I’ve created an OnlineGameSession class, and I can successfully access IOnlineSubsystem and IOnlineSession to create, search for, and join Steam sessions. However, I cannot access any of the IOnlineFriends functions.

IOnlineSubsystem* OnlineSub = IOnlineSubsystem::Get();

if (OnlineSub)
{
	IOnlineFriendsPtr Friends = OnlineSub->GetFriendsInterface();
	if (Friends.IsValid())
	{
		Friends->AnyIOnlineFriendsFunction(); //<-- This line throws an error
	}
}

I can create an IOnlineFriendsPtr pointer, and call IsValid(), but I cannot call any actual functions on it (throws ‘undefined type’ error). IOnlineFriends seems to be set up the same way as IOnlineSession (which I have no issues using), so I really don’t know what the issue is.

Did this get resolved? I want to integrate inviting a friend.

Try #include “OnlineFriendsInterface.h”

While your project auto includes a bunch of stuff this does not (or did not pre 4.6, I haven’t checked to see if this changed) include the online subsystems. I also find that often I’m just getting lucky with my own headers and the way it builds a mega file means that I forget to add a lot of .h files until for some reason the order changes and I get compile errors.

Did that work? Looking to close out older threads.