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:
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 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:
I managed to solve this problem.
Xcode couldn't find the location of the library I was trying to link to.
I noticed that under Build Settings I could specify Path to Link Map File. I tried to hardcode the path to where my library (libsteam_api.dylib) resided, but I got the same error described above.
Then I did something that worked.
I deleted the reference to the library in the Link Binary With Libraries section.
Then I moved the library from its original location into my Xcode project directory.
Then I used the file selection pane in the Link Binary With Libraries section to reselect the library from the Xcode directory.
When I built, everything worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With