Author Topic: INT_MAX is not defined  (Read 4556 times)

jimmychen

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
INT_MAX is not defined
« 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.



weltall

  • Associate Developer
  • Veteran
  • *
  • Posts: 1671
    • View Profile
    • http://weltall.heliohost.org
Re: INT_MAX is not defined
« Reply #1 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
« Last Edit: November 10, 2008, 04:24:07 pm by weltall »

jimmychen

  • Wayfarer
  • *
  • Posts: 8
    • View Profile
Re: INT_MAX is not defined
« Reply #2 on: November 10, 2008, 08:23:32 pm »
cool:) , all success! Thank you.