Engine compile error updating Steamworks from v142 to v149 (uint32 changed to SteamIPAddress_t)

Using 4.23 source

I’m currently attempting to get dedicated servers visible on the steam server browser using advanced sessions plugin. Right now they’re visible only through LAN and not through internet (testing with different machines / steam accounts / networks). I’ve successfully run someone’s simple steam dedicated server project built with UE 4.17 and Steamworks v139 (AppID 480), and the server was visible under internet, so I know it’s not a firewall/port issue.

I figured I would update Steamworks to see if I could rule that out, so I grabbed the latest version.

Extracted files were placed into the appropriate source/binary folders, and the version references in Steamworks.build.cs have been updated from v142 to v149. Some other steps have been noted on where to change steamworks version references, but it seems like they’ve all been updated so the only place to change the version # or directory is in the build.cs.

However, I’m now getting some compile errors coming from OnlineSessionAsyncServerSteam.cpp, which seems to be due to this change in isteamgameserver.h:

virtual uint32 GetPublicIP() = 0;


virtual SteamIPAddress_t GetPublicIP() = 0;

Resulting in:

Error C2664 ‘void FInternetAddr::SetIp(const TCHAR *,bool &)’: cannot convert argument 1 from ‘SteamIPAddress_t’ to ‘uint32’

Error C2664 ‘void ISteamUser::AdvertiseGame(CSteamID,uint32,uint16)’: cannot convert argument 2 from ‘SteamIPAddress_t’ to ‘uint32’

There may be more issues or it could be something else that’s redirecting the error, but this is all the compiler puts out at the moment.

Anyone else encounter this and fix it? Need some c++ wizards to help me out here. Or should I avoid updating and stick with v142 since that seems to be compatible with UE 4.23? I’ve run short on ideas to debug dedicated servers not showing up with steam, so I was hoping to at least get this to compile.


Figured it out based on the unreal source code for 4.25 on github.

In OnlineSessionAsyncServerSteam.cpp, change GetPublicIP() to GetPublicIP().m_unIPv4 in order to retrieve the uint32 value from the SteamIPAddress_t struct, at lines 410 and 446:


SteamUser()->AdvertiseGame(k_steamIDNonSteamGS, SteamGameServerPtr->GetPublicIP().m_unIPv4, Subsystem->GetGameServerGamePort());

Compiled successfully after that