Rock Hard C++ Library

Forum Listing » Game Achievements Forum » View Topic

  • In celebration of all things that are rock hard, or become rock hard, here's my C++ Game Jolt Achievements library in its current state.

    Current Version: 0.5

    Source Code: https://github.com/hworld/gj-cpp-api

    Current Issues 

    It is Windows only, which is really lame, mainly because it relies on Windows networking libraries. I will hopefully change this in the future.

    No support for player status at the moment.

    All calls are synchronous and blocking.

    Last edited on July 30, 2012 - 07:01 PM by CROS

  • CROS, any chance you can supply up to date DLL versions of this lib ?

  • Any plans for Linux?

  • Definitely.

    Does Linux have native headers/libraries for URL calls? Maybe you could lead something like this yourself?! :) Shouldn't be too hard with all the existing code we have! Perhaps something cross-platform using libCURL?

    Last edited on July 29, 2012 - 07:50 AM by Ashley

  • Sorry, I only know how to make games with C++, making a library like this is just beyond my skills.

  • I was thinking up updating this to use ASIO, this way everything could be done asynchronously, unless you explicitly wanted synchronicity. It would also be cross platform, then. http://think-async.com/

  • I've now put all the code in GitHub, in case anyone wants to contribute, they can fork and submit a pull request.

  • So hey, I just now had a look at this and it looks like I can't use this API if I don't have a Visual Studio? I only have access to Linux and apparently Wine can't run it. I did install Wine Development package which contains at least some of the libraries the API requires but I'm still left with many, many errors.

    I'm using Code::Blocks as IDE and MinGW as a compiler.

    edit. I think the problem is in StdString.h included in the API. From comments you see it's clearly writen with Visual Studio in mind. Any recommendation for replacement or workaround?

    edit2. Never mind about above, I found this to replace the old StdString.h file, seeing as this one has MinGW compability. Now only a couple of errors remaining...

    Last edited on April 27, 2013 - 07:40 AM by erakko

  • Yeah, erakko, I believe this is still Windows only. Somebody was working on a Linux version, but I can't remember who. Ouch!

    As I said about a year ago, your best bet is to use the libCURL library and look specifically at the following 4 curl_easy_* functions.

    curl_easy_init
    curl_easy_setopt
    curl_easy_perform
    curl_easy_getinfo

    Have your C++ skills improved since then? There are plenty of examples on the web of how to use libCURL, so it shouldn't be too hard, but I understand if this would be too much for you. Hope this helps!

  • Huh, it was surprisingly easy. For what I know my C++ skills haven't really improved so I guess the library was just so easy to use.

    So in other words I've got this API working on Linux. I'll post a zip once I just get this all cleaned up...

  • This makes me super happy. Do you have github? Any way you'd be able to fork it off and send me a pull request if you do? I would love to get away from the windows-only thing. I actually do most of my development on Linux now as well.

  • Sorry, not github here.

    Anyway, here's a zip. Just like the little readme I wrote says, it's basically the same as the original API, this one is just formated for not to be dependant on Windows libraries and instead of WinHTTP it uses libCURL. In other words it works on Linux. I think it should work on Windows too but I have yet to try that.

  • I'm currently updating the C++ interface. If someone else is working on it, please tell me.
    It should be finished next week.

    Upate June 19.: Currently finishing the docs

    Last edited on June 19, 2013 - 06:58 AM by Maus Games

  • Looking forward to this!

People Online