When I want to use any C++ class in a Plugin on Linux, like I do on Windows where it works perfectly fine, it just crashes the whole client.. I don't get why tho..
An example
Code:
//This crashes on Linux:
int ts3plugin_init() {
printf("Uptown: init\n");
ts3Functions.getPluginPath(pluginPath, 1024, pluginID);
myclass = new MyClass();
return 0;
}
//This works on Linux:
int ts3plugin_init() {
printf("Uptown: init\n");
ts3Functions.getPluginPath(pluginPath, 1024, pluginID);
return 0;
}
Compiled with:
Code:
gcc -c -Wall -O2 -fPIC -o test.o -I../include plugin.cpp
gcc -o meem.so -shared test.o
How can I fix this? I'm externing the function in plugin.h btw.