How to install custom Plugins SDK

I am pretty new to this, so bear with me please. :woozy_face:

I am trying to make a plugin and as a test have just downloaded the plugin sdk and build the example plugin. This gave me a .o and a .so file. I just assumed I just have to put the .so fille in the plugins folder in appdata, but that didn’t seem to work.

I heared from some people that the SDK only works on the 32bit version of ts3, if that is true, how could I make it into a 64bit compatible version?

Thanks :slight_smile:

So, a few things:
The naming is a bit confusing, but there are two SDKs. First there is the TeamSpeak SDK. This is used to build custom client and servers, e.g. as a in-game voice chat integration. Secondly there is the TeamSpeak 3 Client Plugin SDK. This can be used to create plugins for the TeamSpeak 3 client.

On Windows a compiled plugin needs to be a .dll file, on Linux an .so file, and on MacOS a .dylib file. You can get those either by cross-compiling or compiling on the respective OS directly.

The plugin SDK does not dictate the architecture. Whether you compile a 32-bit or a 64-bit binary only depends on the compiler configuration. For a 64-bit TeamSpeak client, the plugin needs to be 64-bit as well, same goes for 32-bit.

Personally, I highly recommend using build tools, like CMake. Though, that might be overkill for smallish projects if you are not yet familiar.

2 Likes

Thanks, works fine. I used the MakeFile in the plugin SDK, but that only produces .so libraries. CMakeLists.txt with

cmake_minimum_required(VERSION 3.0)
project(MyPluginProject)

# Set C standard
set(CMAKE_C_STANDARD 99)

# Include directories
include_directories(include)

# Source files
set(SOURCE_FILES
    src/plugin.c
)

# Add executable or library
add_library(MyPlugin SHARED ${SOURCE_FILES})

# Specify include directory for the library
target_include_directories(MyPlugin PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)

works. :slight_smile:

Yeah, Makefiles are a bit :star2: special :sparkles:. Technically they are called ‘GNU Makefile’, because they are meant for the GNU C Compiler. However, you can use them with the Microsoft MSVC compiler for Windows using nmake.
But in general using cmake is more resilient and just plain easier.
Anyways, I’m glad to hear it works now!