I recently had an idea for a quick little game and decided that I could use the idea to experiment with the Steamworks API in case I ever decided to release it or a future title on Steam. So, I logged into the Steamworks website, accepted their license agreement, and downloaded the SDK. After extracting it, I tried to link it in Code::Blocks. At the top if the "getting started" page, it lists three things you need to do to implement the SDK:
- Include steam_api.dll in the runtime directory or search path.
- Include the library steam_api.lib in the project.
- Include steam_api.h in C++.
I did all those things, as well as include the directories containing these files in the appropriate search directory lists. When I compile, however, I get a long lists of very similar errors. Here's an example of one of the errors (the others are the same type of error but refer to different functions in different classes):
C:\Users\Jonah\Code Libraries\SteamWorks\sdk\public/steam/isteammusic.h: In static member function 'static bool VolumeHasChanged_t::GetMemberVariable(uint32, uint32&, uint32&, uint32&, const char**, const char**)':
C:\Users\Jonah\Code Libraries\SteamWorks\sdk\public/steam/isteammusic.h:62:1: error: no matching function for call to 'VolumeHasChanged_t::GetMemberVar_0(uint32&, uint32&, uint32&, const char**&, const char**&)'
C:\Users\Jonah\Code Libraries\SteamWorks\sdk\public/steam/isteammusic.h:62:1: note: candidate is:
C:\Users\Jonah\Code Libraries\SteamWorks\sdk\public/steam/isteammusic.h:61:1: note: static void VolumeHasChanged_t::GetMemberVar_0(unsigned int&, unsigned int&, uint32&, const char**, const char**)
C:\Users\Jonah\Code Libraries\SteamWorks\sdk\public/steam/isteammusic.h:61:1: note: no known conversion for argument 1 from 'uint32 {aka long unsigned int}' to 'unsigned int&'
In file included from C:\Users\Jonah\Code Libraries\SteamWorks\sdk\public/steam/steam_api.h:24:0,
from C:\Users\Jonah\Documents\Game Development\Twenty Paces\Twenty Paces\main.cpp:2:
My program is a stock SFML example program which opens a window with a static image. The only change I've made is adding "#include <steam/steam_api.h>" at the top of the file, just to see if it would compile. My compiler is MinGW GCC, which came packaged with C::B.
I've tried for hours and can't figure out what I'm doing wrong. Am I missing something obvious? Is Steamworks just not compatible with my compiler? Is there some extra setting I have to change? I'm well and truly stumped. Any help is much appreciated.