hakermania
10th September 2011, 12:56
I know, YES, I know, I've searched the forum and the google but I still don't know what I'm doing wrong :(
I am trying to use QNetWork for a network operation, as somebody suggested (http://www.qtcentre.org/threads/44514-QProcess-start-hangs-application?p=202705#post202705)
As you may know, static functions do not allow calling 'this', so I am trying via a static function available from all the piece of code I have to make QNetwork work.
My problem is that through this static function I am trying to call a non-static function so as to be able to call 'connect' (which needs 'this' which need non-static function -_-)
So, this is how I call my non-static function:
// abc() is static and is called by some other cpp files of my code
void Global::abc(){
// start_abc() is not static so it cannot be called as Global::start_abc(), that's why I'm making an object here
Global *live = new Global();
live->start_abc();
}
And:
error: undefined reference to `vtable for Global'
I feel that it's obvious BUT :/ :(
I am trying to use QNetWork for a network operation, as somebody suggested (http://www.qtcentre.org/threads/44514-QProcess-start-hangs-application?p=202705#post202705)
As you may know, static functions do not allow calling 'this', so I am trying via a static function available from all the piece of code I have to make QNetwork work.
My problem is that through this static function I am trying to call a non-static function so as to be able to call 'connect' (which needs 'this' which need non-static function -_-)
So, this is how I call my non-static function:
// abc() is static and is called by some other cpp files of my code
void Global::abc(){
// start_abc() is not static so it cannot be called as Global::start_abc(), that's why I'm making an object here
Global *live = new Global();
live->start_abc();
}
And:
error: undefined reference to `vtable for Global'
I feel that it's obvious BUT :/ :(