# The macro "SEARCH\_PRESENCE" cannot be resolved

**URL:** <https://forums.unrealengine.com/t/the-macro-search-presence-cannot-be-resolved/1341978>\
**Category:** C++\
**Tags:** onlinesubsystem, unreal-engine, CPP, question\
**Created:** [October 23, 2023, 4:00pm UTC](https://forums.unrealengine.com/t/the-macro-search-presence-cannot-be-resolved/1341978 "2023-10-23T16:00:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MacroLemonXD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MacroLemonXD](https://forums.unrealengine.com/u/MacroLemonXD)\
**Post date:** [October 23, 2023, 4:00pm UTC](https://forums.unrealengine.com/t/the-macro-search-presence-cannot-be-resolved/1341978/1 "2023-10-23T16:00:07Z")

</div>

So I’m now making a simple game in order to learn online-subsystem, but now I’m stuck at this point:  
Rider (I use Rider instead of VS as my IDE) said “cannot resolve symbol SEARCH\_PRESENCE”, restarting Rider IDE or Unreal cannot work either.  
Here’s the code:

```auto
void AMultiplayerDemoCharacter::JoinGameSession()
{
	//Find game sessions
	if(!OnlineSessionInterface.IsValid())
	{
		return;
	}

	OnlineSessionInterface->AddOnFindSessionsCompleteDelegate_Handle(FindSessionsCompleteDelegate);
	
	SessionSearch = MakeShareable(new FOnlineSessionSearch());
	SessionSearch->MaxSearchResults = 10000;
	SessionSearch->bIsLanQuery = false;
	SessionSearch->QuerySettings.Set( , true, EOnlineComparisonOp::Equals);
	
	const ULocalPlayer* LocalPlayer = GetWorld()->GetFirstLocalPlayerFromController();
	OnlineSessionInterface->FindSessions(*LocalPlayer->GetPreferredUniqueNetId(),SessionSearch.ToSharedRef());
	
}

```

So did I missed something?  
Thx if someone could help me.

---

<div class="post-metadata">

**Author:** ![AllegroVivo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AllegroVivo](https://forums.unrealengine.com/u/AllegroVivo)\
**Post date:** [November 4, 2023, 7:20pm UTC](https://forums.unrealengine.com/t/the-macro-search-presence-cannot-be-resolved/1341978/2 "2023-11-04T19:20:34Z")

</div>

Hey! I stumbled on your post while trying to figure this out myself and then randomly stumbled onto the answer. You need `#include "Online/OnlineSessionNames.h"` to access the macro.

I figure it out by double-tapping Shift in Rider and searching the entire project for that macro name, which gave me the file to include. Hope that helps 🙂

---

<div class="post-metadata">

**Author:** ![MacroLemonXD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MacroLemonXD](https://forums.unrealengine.com/u/MacroLemonXD)\
**Post date:** [November 21, 2023, 8:19am UTC](https://forums.unrealengine.com/t/the-macro-search-presence-cannot-be-resolved/1341978/3 "2023-11-21T08:19:13Z")

</div>

It works! Thank you so much! 🙂

---

<div class="post-metadata">

**Author:** ![ivansoria](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ivansoria](https://forums.unrealengine.com/u/ivansoria)\
**Post date:** [July 25, 2024, 4:16am UTC](https://forums.unrealengine.com/t/the-macro-search-presence-cannot-be-resolved/1341978/4 "2024-07-25T04:16:14Z")

</div>

Thank you! Your suggestion helped me, too, when migrating my project from 5.3 to 5.4!

---

<div class="post-metadata">

**Author:** ![2DEVANG2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@2DEVANG2](https://forums.unrealengine.com/u/2DEVANG2)\
**Post date:** [November 1, 2024, 1:05pm UTC](https://forums.unrealengine.com/t/the-macro-search-presence-cannot-be-resolved/1341978/5 "2024-11-01T13:05:39Z")

</div>

it works thanks

---

<div class="post-metadata">

**Author:** ![TheLazyIndianTechie](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/thelazyindiantechie/32/728515_2.png) [@TheLazyIndianTechie](https://forums.unrealengine.com/u/TheLazyIndianTechie)\
**Post date:** [March 5, 2025, 3:55pm UTC](https://forums.unrealengine.com/t/the-macro-search-presence-cannot-be-resolved/1341978/6 "2025-03-05T15:55:33Z")

</div>

Thanks. This helps. I also noted that this is going to be deprecated as of UE 5.5. FYI

 ![Screenshot 2025-03-05 at 4.49.02 PM](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/0/d/60dedce2bf75ed0d8a41e196adcc72a4a4b9949c.png)

---

<div class="post-metadata">

**Author:** ![TylerLantern](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TylerLantern](https://forums.unrealengine.com/u/TylerLantern)\
**Post date:** [June 29, 2025, 9:48am UTC](https://forums.unrealengine.com/t/the-macro-search-presence-cannot-be-resolved/1341978/7 "2025-06-29T09:48:21Z")

</div>

Thank you
