PlaneShift

Development => Development Deliberation => VisualC++ => Topic started by: jimmychen on November 10, 2008, 02:20:50 am

Title: INT_MAX is not defined
Post by: jimmychen on November 10, 2008, 02:20:50 am
I use MSVC 7.1  to build planeshift and get the error:

Code: [Select]
in libpsrpgrules.psmoney.cpp
error C2065: 'INT_MAX' : undeclared identifier 

so I add

Code: [Select]
#include <limits.h>in psconfig.h

And it rebuilds all again :o.

then, another error happens:
Code: [Select]
\planeshift\src\server\command.cpp(162) : error C2666: “pow” :7 overloads have similar conversions
 C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(620): maybe “long double pow(long double,int)”
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(618): or       “long double pow(long double,long double)”
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(572): or       “float pow(float,int)”
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(570): or       “float pow(float,float)”
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(534): or       “double pow(int,int)”
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(532): or       “double pow(double,int)”
        C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(195): or       “double pow(double,double)”

it's the only error, please tell me to use which one?? Thanks.


Title: Re: INT_MAX is not defined
Post by: weltall on November 10, 2008, 05:25:02 am
remove the (double). and thank microsoft strange ideas :)

btw can you join #planeshift-build on freenode in about 2 hours?

EDIT: well nvm i've fixed the second part by removing the pow entirely
Title: Re: INT_MAX is not defined
Post by: jimmychen on November 10, 2008, 08:23:32 pm
cool:) , all success! Thank you.