-
Notifications
You must be signed in to change notification settings - Fork 27
Getting Started
This page explains how to setup mod.io SDK into your game. Visual C++ and MinGW are supported for Windows, GCC for Linux and Clang for OS X.
Download the latest version of the SDK from the github releases page or from the mod.io website, it provides all the files needed to integrate mod.io into your game or modding tool.
Link the provided import library modio.lib
and place all the provided DLL files next to your executable.
The import library is located at lib/visualc++/
and the DLLs at bin/visualc++/
.
Link the provided import library modio.a
and place all the provided DLL files next to your executable.
The import library is located at lib/mingw/
and the DLLs at bin/mingw/
.
Note: mod.io is compiled using C++11 so you will need to add the -std=c++11
compiler flag.
mod.io SDK uses LibCurl, Zlib, Minizip and Pthread. Usually, they are already present on your Linux distribution. If it's not the case, install them using your package manager:
apt-get install g++ libcurl4-openssl-dev zlib1g-dev libpthread-stubs0-dev
Link the the provided shared library modio.so
located in the lib/linux/
directory.
Note: mod.io SDK is built using C++11 so you will need to add the -std=c++11
compiler flag.
Install Clang shipped with the XCode build essentials. This will install all mod.io SDK dependencies so no additional setup is required.
Link the the provided shared library modio.dylib
located in the lib/osx/
directory.
Note: mod.io SDK is built using C++11 so you will need to add the -std=c++11
compiler flag.
Add the provided include/
directory to your compiler's include path.
That's it! You should be able to use the mod.io SDK on your project.
#include <ModioSDK.h>
int main()
{
modioInit(/*your game id*/7, "YOUR-API-KEY");
return 0;
}
The following are complete Makefile examples that shows how to link and import mod.io SDK into your project.
#Makefile
#run with the 'nmake' command
CC = cl.exe
CFLAGS = /EHsc /MD
SOURCES = Example.cpp
LIBRARIES = modio.lib
build:
$(CC) $(CFLAGS) $(SOURCES) /I ModIOSDK/include /link $(LIBRARIES) /SUBSYSTEM:CONSOLE
#Makefile
#run with the 'MinGW32-make.exe' command
CC=g++
CFLAGS=-c -Wall -std=c++11
SOURCES=Example.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=Example
LIBRARIES=modio.a
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(OBJECTS) $(LIBRARIES) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@ -I ModIOSDK/include
#Makefile
#run with the 'make' command
CC=g++
CFLAGS=-c -Wall -std=c++11
LDFLAGS=-lcurl -pthread -lz
SOURCES=Example.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=Example
LIBRARIES=modio.so
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@ -I ModIOSDK/include
#Makefile
#run with the 'make' command
CC=clang++
CFLAGS=-c -Wall -std=c++11
LDFLAGS=-lcurl -lz
SOURCES=Example.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=Example
LIBRARIES=modio.dylib
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) $(LIBRARIES) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@ -I ../include
- Home
- Table of Contents
- Getting Started
- SDK Methods
- Creators
- Editors
- Schemas
- modio::Avatar
- modio::Comment
- modio::Dependency
- modio::Download
- modio::Error
- modio::Filehash
- modio::Game
- modio::GameTagOption
- modio::Header
- modio::Icon
- modio::Image
- modio::InstalledMod
- modio::Logo
- modio::Media
- modio::MetadataKVP
- modio::Mod
- modio::ModEvent
- modio::Modfile
- modio::QueuedModDownload
- modio::QueuedModfileUpload
- modio::Rating
- modio::Response
- modio::Stats
- modio::Tag
- modio::User
- Debugging
- Constants
-
C Compatibility
- Methods
- Initialization, Process and Shutdown (C compatible)
- User Authentication (C compatible)
- Mods (C compatible)
- Modfiles (C compatible)
- Media (C compatible)
- Subscriptions (C compatible)
- Events (C compatible)
- Stats (C compatible)
- Tags (C compatible)
- Ratings (C compatible)
- Metadata KVP (C compatible)
- Dependencies (C compatible)
- Comments (C compatible)
- Reports (C compatible)
- Me (C compatible)
- Downloads (C compatible)
- Uploads (C compatible)
- Logs (C compatible)
- External Auth (C compatible)
- Configuration (C compatible)
- Creators
- Editors
- Schemas
- ModioAvatar
- ModioComment
- ModioDependency
- ModioDownload
- ModioError
- ModioFilehash
- ModioGame
- ModioGameTagOption
- ModioHeader
- ModioIcon
- ModioImage
- ModioInstalledMod
- ModioListNode
- ModioLogo
- ModioMedia
- ModioMetadataKVP
- ModioMod
- ModioModEvent
- ModioModfile
- ModioQueuedModDownload
- ModioQueuedModfileUpload
- ModioRating
- ModioResponse
- ModioStats
- ModioTag
- ModioUser
- Methods
- Building