From: Daniel B. <d.b...@ie...> - 2002-02-27 21:39:16
|
On Wed, 27 Feb 2002, William Dulyea wrote: > Can anyone make a suggestion as to how to fix this: > > Compiler error: > ......................... > emu-gui.c:2296: `mgr' undeclared (first use in this function) > emu-gui.c:2296: (Each undeclared identifier is reported only once > emu-gui.c:2296: for each function it appears in.) > make: *** [emu-gui.o] Error 1 > > traces to a line in my code with: > ......................... > > dsp_stop_proc( &dpm ); > ... > .. > > I chased this call to a MACRO defined in ./utils/mixer/include/dsp.h > > #define IS_AUDIGY mgr->card_info.card_type==AUDIGY_CARD==1 > #define IS_EMU10K1 mgr->card_info.card_type==AUDIGY_CARD==0 Oops, that doesn't look right, it should have been this: #define IS_AUDIGY mgr->card_info.card_type==AUDIGY_CARD #define IS_EMU10K1 mgr->card_info.card_type==EMU10K1_CARD I guess I should have also made it IS_AUDIGY(mgr), oh well, consider these "internal use only". > #define dsp_stop_proc(mgr) IS_EMU10K1?dsp_load_reg(DBG > ,DBG_SINGLE_STEP,mgr):dsp_load_reg(A_DBG,A_DBG_SINGLE_STEP,mgr); > #define dsp_start_proc(mgr) IS_EMU10K1?dsp_load_reg(DBG > ,0,mgr):dsp_load_reg(A_DBG ,0,mgr); > Try these instead: #define dsp_stop_proc(mgr) mgr->card_info.card_type==EMU10K1_CARD?dsp_load_reg(DBG,DBG_SINGLE_STEP,mgr):dsp_load_reg(A_DBG,A_DBG_SINGLE_STEP,mgr); #define dsp_start_proc(mgr) mgr->card_info.card_type==EMU10K1_CARD?dsp_load_reg(DBG,0,mgr):dsp_load_reg(A_DBG ,0,mgr); > After looking at this I would think that the IS_EMU10K1 is what is giving > me the problem here as it assumes a great deal about how I might declare a > dsp manager structure, but the fact that the compiler does not complain > about the same effect with using dsp_start_proc() really tickles me! > > Any thoughts out there...? > > Note: it appears that the problem does not manifest itself in the dsp tools > as a structure of dsp_patch_manager is actually declared as "mgr" > > > -William > > -- Daniel Bertrand |