[ODE] still having problems building under vs.net 2002 (vs7.0)

Mike Reinstein web_fella at hotmail.com
Thu May 20 01:29:02 MST 2004


Russ:

I tried changing them from extern inline to static but it didnt solve the 
problem
I think I have a vague idea of whats going on
take the following excerpt from odemath.h:

#ifdef __cplusplus
static float dDISTANCE (const float a[3], const float b[3])
	{ return (float) dSqrt( (a[0]-b[0])*(a[0]-b[0]) + (a[1]-b[1])*(a[1]-b[1]) + 
(a[2]-b[2])*(a[2]-b[2]) ); }
static  double dDISTANCE (const double a[3], const double b[3])
	{ return dSqrt( (a[0]-b[0])*(a[0]-b[0]) + (a[1]-b[1])*(a[1]-b[1]) + 
(a[2]-b[2])*(a[2]-b[2]) ); }
#else
...
#endif

when I attempt to compile my project, trhe first error I encounter in 
odeMath.h is at the 2nd declaration of dDistance. Here the error:
odemath.h(148): error C2733: second C linkage of overloaded function 
'dDISTANCE' not allowed

it seems to me as though its not able to differentiate between float and 
double types, and is subsequently not able to overload the ddistance 
function because  static  double dDISTANCE(...) and static float 
dDISTANCE(...) collide


any thoughts?

Neko



>From: Russ Smith <russ at q12.org>
>To: "Mike Reinstein" <web_fella at hotmail.com>
>CC: ode at q12.org
>Subject: Re: [ODE] still having problems building under vs.net 2002  
(vs7.0)
>Date: Wed, 19 May 2004 22:05:28 -0700
>
>
> > c:\Program Files\Microsoft Visual Studio
> > .NET\Vc7\include\ode\odemath.h(57): error C2733: second C linkage 
of
> > overloaded function 'dDOT' not allowed
>
>i think this is your clue. in odemath.h i've created various inline
>versions of the dDOT function. they're declared 'extern inline', which
>(i thought) would prevent the compiler from instantiating them (although
>maybe this is only a gcc behavior). try removing the 'extern' modifier
>from those functions. if that doesn't work, try making them non-inline
>static.
>
>russ.
>
>--
>Russell Smith
>http://www.q12.org

_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.click-url.com/go/onm00200413ave/direct/01/



More information about the ODE mailing list