philippj / SteamworksPy

A working Python API system for Valve's Steamworks.
MIT License
212 stars 39 forks source link

Error when running STEAMWORKS() #99

Closed gungugugungu closed 6 months ago

gungugugungu commented 6 months ago

Hi! I've used this library before, and it worked perfectly but when I tried it again, this time on another system, it didn't work. I used a version of SteamworksPy.so that I compiled from the latest version but when I ran it, I got this error:

Traceback (most recent call last):
  File "/home/gungu/Documents/coding/python/Steam game/main.py", line 9, in <module>
    steamworks = STEAMWORKS()
  File "/home/gungu/Documents/coding/python/Steam game/steamworks/__init__.py", line 52, in __init__
    self._initialize()
  File "/home/gungu/Documents/coding/python/Steam game/steamworks/__init__.py", line 101, in _initialize
    self._cdll      = CDLL(library_path) # Throw native exception in case of error
  File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/gungu/Documents/coding/python/Steam game/SteamworksPy.so: undefined symbol: SteamAPI_Init

Here are the contents of my folder: data(folder) libsteam_api.so main.py sdk(folder) steam(folder) steam_appid.txt steamworks(folder) SteamworksPy.so

gungugugungu commented 6 months ago

So, I recompiled SteamwoksPy.so, with changes made from this post: https://github.com/philippj/SteamworksPy/issues/94#issuecomment-1743869206 and it just suprisingly worked.