XInitThreads call needed in Linux
Status: Beta
Brought to you by:
erdem_ua
When a file is dropped in the Drag and Drop window running source in Fedora 17, there is a segfault and an error inicating XInitThreads needs to be called before using threads. This can be done as follows:
Add constructor for MeteoriteApp().
class MeteoriteApp : public wxApp
{
public:
virtual bool OnInit();
public: MeteoriteApp()
{
if ( XInitThreads() == 0 ) {
exit( EXIT_FAILURE );
}
}
};
a link to Xlib.so is required for this to work as well.
Hı James,
I don't think if it is required.
Indeed, all required X libraries need to be called from wxWidgets already.
Also Drag and Drop problem solved at SVN trunk, but can't find time to give a release this days. If you can compile Meteorite from svn trunk, I believe you don't see such an error.
Thanks.
Erdem