Forum

Results 1 to 2 of 2
  1. #1
    Join Date
    December 2016
    Posts
    10

    Using C++ classes crashes plugins on Linux.

    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.

  2. #2
    Join Date
    September 2005
    Location
    Germany / Dortmund
    Posts
    1,376
    Try to invoke g++ instead of gcc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. List of Classes and Objects
    By Arya_79 in forum Skins / Icon & Sound Packs
    Replies: 37
    Last Post: November 11th, 2016, 05:06 PM
  2. TS3 Linux Client crashes
    By dreign in forum Linux
    Replies: 1
    Last Post: May 2nd, 2016, 10:58 PM
  3. [Linux] TeamSpeak 3 crashes when dragging any file over it
    By Xylemon in forum Bug Reports [EN/DE]
    Replies: 2
    Last Post: July 5th, 2014, 10:08 AM
  4. Teamspeak 3 Client crashes under Linux
    By Somnium in forum Bug Reports [EN/DE]
    Replies: 0
    Last Post: February 10th, 2014, 01:11 AM
  5. TeamSpeak 3 and Qt classes/objectnames
    By Leon M in forum Skins / Icon & Sound Packs
    Replies: 0
    Last Post: March 19th, 2010, 04:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •