Hello,

I think we have discovered a problem compiling DX code
with a C++ compiler.  Has anyone attempted calling DX module
functions from a C++ application???

We have been trying to build the Simple.c sample program with
both Sun CC 5.0 and g++ 2.8.1.  Both compilers complain about the
same section of code; the following structure from $(DXHOME)/
include/dx/UserInteractors.h

struct _userInteractor
{
    InitMode  InitMode;
    EndMode  EndMode;
    SetCamera  SetCamera;
    GetCamera  GetCamera;
    SetRenderable  SetRenderable;
    GetRenderable  GetRenderable;
    EventHandler  EventHandler;
};

The g++ errors are as follows:

/usr/local/dx/include/dx/UserInteractors.h:98: declaration of identifier `InitMode' as `void * (* InitMode)(struct object *, int, int, int *)'
/usr/local/dx/include/dx/UserInteractors.h:84: conflicts with other use in class as `typedef void * (* InitMode)(struct object *, int, int, int *)'
/usr/local/dx/include/dx/UserInteractors.h:99: declaration of identifier `EndMode' as `void (* EndMode)(void *)'
/usr/local/dx/include/dx/UserInteractors.h:85: conflicts with other use in class as `typedef void (* EndMode)(void *)'
/usr/local/dx/include/dx/UserInteractors.h:100: declaration of identifier `SetCamera' as `void (* SetCamera)(void *, float *, float *, float *, int, float, float)'
/usr/local/dx/include/dx/UserInteractors.h:87: conflicts with other use in class as `typedef void (* SetCamera)(void *, float *, float *, float *, int, float, float)'
/usr/local/dx/include/dx/UserInteractors.h:101: declaration of identifier `GetCamera' as `int (* GetCamera)(void *, float *, float *, float *, int *, float *, float *)'
/usr/local/dx/include/dx/UserInteractors.h:89: conflicts with other use in class as `typedef int (* GetCamera)(void *, float *, float *, float *, int *, float *, float *)'
/usr/local/dx/include/dx/UserInteractors.h:102: declaration of identifier `SetRenderable' as `void (* SetRenderable)(void *, struct object *)'
/usr/local/dx/include/dx/UserInteractors.h:90: conflicts with other use in class as `typedef void (* SetRenderable)(void *, struct object *)'
/usr/local/dx/include/dx/UserInteractors.h:103: declaration of identifier `GetRenderable' as `int (* GetRenderable)(void *, struct object **)'
/usr/local/dx/include/dx/UserInteractors.h:91: conflicts with other use in class as `typedef int (* GetRenderable)(void *, struct object **)'
/usr/local/dx/include/dx/UserInteractors.h:104: declaration of identifier `EventHandler' as `void (* EventHandler)(void *, union DXEvent *)'
/usr/local/dx/include/dx/UserInteractors.h:93: conflicts with other use in class as `typedef void (* EventHandler)(void *, union DXEvent *)'

The CC errors are as follows:

"/usr/local/dx/include/dx/UserInteractors.h", line 104: Error: Redefining EventHandler after use in _userInteractor.
"/usr/local/dx/include/dx/UserInteractors.h", line 103: Error: Redefining GetRenderable after use in _userInteractor.
"/usr/local/dx/include/dx/UserInteractors.h", line 102: Error: Redefining SetRenderable after use in _userInteractor.
"/usr/local/dx/include/dx/UserInteractors.h", line 101: Error: Redefining GetCamera after use in _userInteractor.
"/usr/local/dx/include/dx/UserInteractors.h", line 100: Error: Redefining SetCamera after use in _userInteractor.
"/usr/local/dx/include/dx/UserInteractors.h", line 99: Error: Redefining EndMode after use in _userInteractor.
"/usr/local/dx/include/dx/UserInteractors.h", line 98: Error: Redefining InitMode after use in _userInteractor.

Anyone have any ideas about this?

Thanks.

-Steve
 

--
Stephen Dzurenko
Research Engineer / Scientist Associate

Advanced Sonar Division / Advanced Technology Laboratory

Applied Research Laboratories
The University of Texas at Austin
P.O. Box 8029
Austin, Texas  78713-8029
10000 Burnet Road 78758-4423

Reply via email to