steamworks4j icon indicating copy to clipboard operation
steamworks4j copied to clipboard

Undefined symbol: SteamAPI_Init (Rebuild native libraries?)

Open dolda2000 opened this issue 2 years ago • 1 comments

I'm new to Steam, so I'm not really sure if this is something that changed with the Steamworks SDK recently or if I'm doing something wrong, but it looks like the former to me.

Trying to get some simple sample code running, I get the following error when running SteamAPI.init():

java: symbol lookup error: /tmp/lwjgl_fredrik/3.3.3-snapshot/x64/libsteamworks4j.so: undefined symbol: SteamAPI_Init

This is on Linux, in case it makes a difference. Looking at libsteam_api.so, it does indeed not have any SteamAPI_Init symbol. Rather, looking further at the include files in the SDK, SteamAPI_Init is now an inline function that only exists in the header files: From steam_api.h:

inline bool SteamAPI_Init()
{
	return SteamAPI_InitEx( NULL ) == k_ESteamAPIInitResult_OK;
}

I followed the instructions to rebuild the native libraries, and having done that, it now seems to work properly. Therefore, it seems to me that the native libraries that ship with the Git repo should be rebuilt and recommitted. I would do this myself, but I don't have access to a Windows or MacOS build environment.

dolda2000 avatar Dec 23 '23 01:12 dolda2000

Having found the list of historical Steamworks SDKs for download, I found that this change was introduced in version 1.58a, currently the latest version.

dolda2000 avatar Dec 26 '23 13:12 dolda2000