Error on compiling from cvs with vc++ express 2008

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
ahmetalperparker
Posts: 90
Joined: Wed Oct 26, 2005 6:31 am
Location: Istanbul Technical University

Error on compiling from cvs with vc++ express 2008

Post by ahmetalperparker »

Dear all, I only get this error on compiling Opensees from cvs. Do you have an idea how to solve it? (Code line is as follows: long int rows = pow(2,n); )
Regards
Ahmet Alper Parker

.\..\..\SRC\reliability\analysis\analysis\SystemAnalysis.cpp(498) : error C2668: 'pow' : ambiguous call to overloaded function
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\math.h(575): could be 'long double pow(long double,int)'
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\math.h(527): or 'float pow(float,int)'
C:\Program Files\Microsoft Visual Studio 9.0\VC\include\math.h(489): or 'double pow(double,int)'
while trying to match the argument list '(int, int)'
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

what is the actual file the code is in.
ahmetalperparker
Posts: 90
Joined: Wed Oct 26, 2005 6:31 am
Location: Istanbul Technical University

Post by ahmetalperparker »

opensees\src\reliability\analysis\analysis\systemanalysis.cpp line(498)
Thanks for the repply! :)
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

it has already been fixed in the repository.
the code now looks like

Code: Select all

 long int rows = (long int)pow(2.0,n);
you need to either update using cvs or make the change manually yourself.
ahmetalperparker
Posts: 90
Joined: Wed Oct 26, 2005 6:31 am
Location: Istanbul Technical University

Post by ahmetalperparker »

Many thanks ! :)
Post Reply