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 » Sun May 18, 2008 5:10 am

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: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk » Mon Jun 02, 2008 11:14 am

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 » Fri Jun 06, 2008 4:34 am

opensees\src\reliability\analysis\analysis\systemanalysis.cpp line(498)
Thanks for the repply! :)

fmk
Site Admin
Posts: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk » Fri Jun 06, 2008 9:58 am

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 » Fri Jun 20, 2008 9:27 am

Many thanks ! :)

Post Reply