Skip to content

How to start with marmalade

DhruvCShepHertz edited this page Jul 9, 2013 · 6 revisions

App42 Cloud SDK for Marmalade

Building notes for external Libraries

To use App42 Marmalade SDK, copy the marmalade folder with your project folder. In your mkb file, define marmalade module path & HTTP SSL using

define option module_path="../App42" 
define IW_HTTP_SSL

and add app42 and iwhttp to your subproject.

subproject
{
    app42
    iwhttp
    iwnui
}

Example MKB file

option module_path="../App42"
define IW_HTTP_SSL
subproject
{
  app42
  iwhttp
  iwnui
}

files
{
	(source)
	main.cpp
}

Running the MKB file

App42 Marmalade Leaderboard

Simply double click on the mkb file and it should generate visual studio project. For your application to build and link properly you need to ensure that your library search path and linker flags are correct. In most cases, if you have setup your mkb file correctly this - there should not be any further steps. However if you are getting linking errors, make sure that Your library include path contains the path to the app42 lib for your target eg: App42Marmalade/marmalade/lib/x86 should be included if you are build target is xDebug86 on visual studio.

For running the sample code you need apiKey & secretKey and the gameName for which you can save user score and get top rankers etc.

After creating the app from AppHQ you get the apiKey & secretKey of your sample app. Now you can create your game from AppHQ Menu by giving the name of the game and description for it :-

Business Service Manager -> Game Service -> Add Game

After putting the credentials in main.cpp you are ready to use.

App42 SDK internally uses cJSON for serializing and deserializing JSON data.

 Copyright (c) 2009 Dave Gamble

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.

/*cJSON */
/* JSON parser in C. */

Clone this wiki locally