• Butterfly
    Butterfly
    Posts: 62 from 2004/9/8
    From: France
    @CISC: ok.. thanks :)
    My compilation works better but I have a second little problem now...

    for dos.cpp, GCC tell me:
    g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -noixemul -I/usr/include/SDL -g -O2 -c -o dos.o dos.cpp
    In file included from dos.cpp:28:
    ../../include/callback.h:93: parse error before `{'
    ../../include/callback.h:93: parse error before `char'
    ../../include/callback.h:93: parse error before `->'
    ../../include/callback.h:93: parse error before `->'
    ../../include/callback.h:93: parse error before `->'
    ../../include/callback.h:93: ANSI C++ forbids declaration `_Allocate_re' with no type
    ../../include/callback.h:93: ANSI C++ forbids initialization of member `_Allocate_re'
    ../../include/callback.h:93: making `_Allocate_re' static
    ../../include/callback.h:93: ANSI C++ forbids in-class initialization of non-const static member `_Allocate_re'
    ../../include/callback.h:93: field initializer is not constant
    ../../include/callback.h:93: declaration of `int CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: conflicts with previous declaration `void * CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: ANSI C++ forbids declaration `_Allocate_re' with no type
    ../../include/callback.h:93: declaration of `int CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: conflicts with previous declaration `void * CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: duplicate member `CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: duplicate member `CALLBACK_HandlerObject::_Allocate_re'
    ../../include/callback.h:93: parse error at null character
    ../../include/callback.h: In function `Bit16u Get_callback()':
    ../../include/callback.h:94: `m_callback' undeclared (first use this function)
    ../../include/callback.h:94: (Each undeclared identifier is reported only once
    ../../include/callback.h:94: for each function it appears in.)
    ../../include/callback.h: At top level:
    ../../include/callback.h:97: parse error before `}'
    dos.cpp: In method `DOS::DOS(Section *)':
    dos.cpp:1059: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1062: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1065: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1068: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1071: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1074: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    dos.cpp:1077: no matching function for call to `CALLBACK_HandlerObject::Set_RealVec (int)'
    make[3]: *** [dos.o] Error 1
    make[3]: Leaving directory `/DEV/dosbox/src/dos'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/DEV/dosbox/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/DEV/dosbox'
    make: *** [all] Error 2

    and src dosbox/include/callback.h...
    #ifndef DOSBOX_CALLBACK_H
    #define DOSBOX_CALLBACK_H

    #ifndef DOSBOX_MEM_H
    #include "mem.h"
    #endif

    typedef Bitu (*CallBack_Handler)(void);
    extern CallBack_Handler CallBack_Handlers[];
    enum { CB_RETN,CB_RETF,CB_IRET,CB_IRETD,CB_IRET_STI,CB_IRET_EOI_PIC1,
    CB_IRQ0,CB_IRQ1,CB_IRQ9,CB_IRQ12,CB_IRQ12_RET,CB_IRQ6_PCJR,
    CB_INT29,CB_INT16,CB_HOOKABLE,CB_TDE_IRET,CB_IPXESR,CB_IPXESR_RET };

    #define CB_MAX 128
    #define CB_SIZE 32
    #define CB_SEG 0xF100
    enum { CBRET_NONE=0,CBRET_STOP=1 };
    extern Bit8u lastint;

    INLINE RealPt CALLBACK_RealPointer(Bitu callback) {
    return RealMake(CB_SEG,callback*CB_SIZE);
    }
    INLINE PhysPt CALLBACK_PhysPointer(Bitu callback) {
    return PhysMake(CB_SEG,callback*CB_SIZE);
    }
    INLINE PhysPt CALLBACK_GetBase(void) {
    return CB_SEG << 4;
    }

    Bitu CALLBACK_Allocate();
    void CALLBACK_Idle(void);
    void CALLBACK_RunRealInt(Bit8u intnum);
    void CALLBACK_RunRealFar(Bit16u seg,Bit16u off);
    bool CALLBACK_Setup(Bitu callback,CallBack_Handler handler,Bitu type,const char* descr);
    Bitu CALLBACK_Setup(Bitu callback,CallBack_Handler handler,Bitu type,PhysPt addr,const char* descr);
    const char* CALLBACK_GetDescription(Bitu callback);
    bool CALLBACK_Free(Bitu callback);
    void CALLBACK_SCF(bool val);
    void CALLBACK_SZF(bool val);

    extern Bitu call_priv_io;
    class CALLBACK_HandlerObject{
    private:
    bool installed;
    Bit16u m_callback;
    enum {NONE,SETUP,SETUPAT} m_type;
    struct {
    RealPt old_vector;
    Bit8u interrupt;
    bool installed;
    } vectorhandler;
    public:
    CALLBACK_HandlerObject():installed(false),m_type(NONE){vectorhandler.installed=false;}
    ~CALLBACK_HandlerObject();
    //Install and allocate a callback.
    void Install(CallBack_Handler handler,Bitu type,const char* description);
    void Install(CallBack_Handler handler,Bitu type,PhysPt addr,const char* description);
    //Only allocate a callback number
    void Allocate(CallBack_Handler handler,const char* description=0);
    Bit16u Get_callback(){return m_callback;}
    RealPt Get_RealPointer(){ return CALLBACK_RealPointer(m_callback);}
    void Set_RealVec(Bit8u vec);
    };
    #endif

    but all is normal for me. I don't understand why I have a problem for "void Allocate(CallBack_Handler handler,const char* description=0)"...

    [ Edited by rusback on 2007/5/16 5:17 ]
    PegasosII G4 512Mo 80Go ATI RADEON 9200SE....
    Yeah! The best it's MorphOS :)
  • »16.05.07 - 04:28
    Profile Visit Website