Re: linker errors with class

2008-10-26 Thread torhu
Mike Parker wrote: ... Denis Koroskin wrote: No, it shouldn't. You may implement function bodies in other modules and/or languages (in C, for example, just make sure names have proper mangling). Right, but it just feels wrong to me for constructors & destructors since they are a required par

Re: linker errors with class

2008-10-26 Thread Mike Parker
Denis Koroskin wrote: On Sun, 26 Oct 2008 10:03:32 +0300, Mike Parker <[EMAIL PROTECTED]> wrote: Michael P. wrote: BCS Wrote: Reply to Michael P., I'm getting an undefined reference error with Derelict and SDL. I tried to create an SDLImage class, but I got an error when the files try to l

Re: std.math.pow

2008-10-26 Thread Saaa
Thanks :) > No. See the section on function overloading on this page: > http://www.digitalmars.com/d/1.0/function.html > > So for pow(x, 2u), where x is a double, the match level for both > (real, uint) and (real, real) is "match with implicit conversions." > Therefore, it's an error.

Re: std.math.pow

2008-10-26 Thread Jarrett Billingsley
On Sun, Oct 26, 2008 at 8:47 AM, Saaa <[EMAIL PROTECTED]> wrote: >> you can solve that by casting x into real before the call >> pow(cast(real)x,2U); > > Yes, but why is this necessary? > Isn't there a preference to more matching arguments if all arguments could > be implicitly converted? No. See

Re: linker errors with class

2008-10-26 Thread Denis Koroskin
On Sun, 26 Oct 2008 10:03:32 +0300, Mike Parker <[EMAIL PROTECTED]> wrote: Michael P. wrote: BCS Wrote: Reply to Michael P., I'm getting an undefined reference error with Derelict and SDL. I tried to create an SDLImage class, but I got an error when the files try to link together. I've atta

Re: linker errors with class

2008-10-26 Thread Michael P.
Mike Parker Wrote: > Michael P. wrote: > > BCS Wrote: > > > >> Reply to Michael P., > >> > >>> I'm getting an undefined reference error with Derelict and SDL. > >>> I tried to create an SDLImage class, but I got an error when the files > >>> try to link together. > >>> I've attached the two .d fi

Re: std.math.pow

2008-10-26 Thread Saaa
"Johan Granberg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Saaa wrote: > >> ? >> main.d(118): function std.math.pow called with argument types: >> (double,uint) >> matches both: >> std.math.pow(real,uint) >> and: >> std.math.pow(real,real) >> >> Also, I use pow(x,2U). Is th

Re: std.math.pow

2008-10-26 Thread Johan Granberg
Saaa wrote: > ? > main.d(118): function std.math.pow called with argument types: > (double,uint) > matches both: > std.math.pow(real,uint) > and: > std.math.pow(real,real) > > Also, I use pow(x,2U). Is this the correct function to use or is there a > dedicated x*x function? you can solve that

std.math.pow

2008-10-26 Thread Saaa
? main.d(118): function std.math.pow called with argument types: (double,uint) matches both: std.math.pow(real,uint) and: std.math.pow(real,real) Also, I use pow(x,2U). Is this the correct function to use or is there a dedicated x*x function?

Re: linker errors with class

2008-10-26 Thread Mike Parker
Michael P. wrote: BCS Wrote: Reply to Michael P., I'm getting an undefined reference error with Derelict and SDL. I tried to create an SDLImage class, but I got an error when the files try to link together. I've attached the two .d files in a rar. I compiled with "build imagetest". I have Bud