I am a hobbyist programmer trying to integrate the SteamworksForPython API into a Python-based game. This API is a Python wrapper of the Steamworks API, which only officially supports C++. I am working on MacOS Sierra 10.12.6.
Blindly following the documentation, I have done the following:
- I have downloaded the SteamworksForPython repo.
- I have added the steam header directory from the Steamworks SDK (/sdk/public/steam) to that repo.
- I have added to that repo the Steam API file appropriate to my operating system (in my case, libsteam_api.dylib from /sdk/redistributable_bin/osx32).
The next step listed in the documentation is to create a new dylib file. Unfortunately, the steps to do this haven't been described for MacOS yet.
Looking at the process for Linux and Windows, it seems like I need to create this dynamic library file using the repo's SteamworksPy.cpp file and the steam_api.h header file from the Steamworks SDK.
I have researched how to create a dylib file using Xcode and am currently trying to do it. The process seems similar to the one described by the documentation for Windows using Visual Studio.
I have done the following:
- I have created a new Xcode project of type plain C++ dynamic library.
- I have added SteamworksPy.cpp into the Compile Sources list.
- I have added steam_api.h to the Headers list (under public, not private or project).
- I have added libsteam_api.dylib to the Link Binary With Libraries section.
I am getting an error when I try to build, however. Here is a screenshot:
And here is a more explicit screenshot of the linker error:
After reading this, this, and this, I think the problem is that Xcode doesn't know where to look for the library I'm trying to link to, so I need to tell it where to look. This should be simple, but I can't manage to do it.
Can anyone give me advice on how to proceed?
Similar questions that were helpful, but didn't lead me to a solution: