Re: Timer start registration breaks the gtk_main()



On Sat, 26 Mar 2011 21:10:30 +0100
Nicola Fontana <ntd entidi it> wrote:
> ReadData() is not a good old C function, but a C++ method, carrying
> around a pointer to the CFrame instance. You should make ReadData()
> static [ ...]

That is a less grievous error than the original code (it will work on
gcc), but a potential error none the less. GTK+ callbacks should have C
linkage specification whereas static member functions have C++ linkage.

gcc will be OK.  Some compilers (in particular some intel compilers)
will not: it won't work with any compiler which uses a different calling
convention for static member functions than functions with C linkage.

Chris




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]