Compilation of latest CVS falls over with DEC cxx in LyXView.C

cxx -ptr /tmp/lyx_cxx_repository -std strict_ansi -nocleanup -O2
-DHAVE_CONFIG_H -I. -I. -I. -I../images -I../src/cheaders -I/usr/local/include
-g -MD -c LyXView.C cxx: Error: LyXView.C, line 297: no instance of overloaded
function           "Timeout::callback" matches the argument list           
argument types are: (void (void *) C, LyXView *) 
autosave_timeout.callback(C_LyXView_AutosaveTimerCB, this);
-------------------------^

The problem being thatC_LyXView_AutosaveTimerCB is defined extern "C", whilst
Timeout::callback expects (void (void *), LyXView *) arguments

It can be compiled with the extremely ugly hack:
        
autosave_timeout.callback(reinterpret_cast<Timeout::TimeoutCallback>(C_LyXView_AutosaveTimerCB),
 this);

Alternatively, could redefine Timeout::calback to accept  LyXView::AutoSave()
directly. Ie, with (void (), LyXView *) arguments.

Angus

Reply via email to