HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
HYPHY Package >> HyPhy bugs >> Undeclared identifier in likefunc.cpp
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1150153955

Message started by Leon on Jun 12th, 2006 at 4:12pm

Title: Undeclared identifier in likefunc.cpp
Post by Leon on Jun 12th, 2006 at 4:12pm

 HI!

 I´ve been trying to compile hyphy on a red hat 7.1 /kernel 2.4.2-2  /gcc version 2.96/pentium 4 system and have been getting the following message when I run "build.sh SP":

File HYNetInterface.cpp is up to date
Building likefunc.cpp
likefunc.cpp: In method `_AssociativeList
*_LikelihoodFunction::SimulateCodonNeutral (_Matrix *, _Matrix *, long
int)':
likefunc.cpp:11484: `round' undeclared (first use this function)
likefunc.cpp:11484: (Each undeclared identifier is reported only once
for each function it appears in.)
Error during compilation

  Any hints?

  Thanks!

  Leon


Title: Re: Undeclared identifier in likefunc.cpp
Post by Sergei on Jun 12th, 2006 at 4:20pm
Dear Leon,

'round' is a standard function which should be in math.h
Sounds like it's missing from the RedHat version of math.h. You can search the header files in /include to see where it is declared or you could add something like
[code]

#define round (x) floor((x)+0.5)

[/code]
to likefunc.cpp and recompile.

Cheers,
Sergei

Title: Re: Undeclared identifier in likefunc.cpp
Post by Leon on Jun 12th, 2006 at 5:21pm

  Dear Sergei,

  I tried adding the

#define round (x) floor((x)+0.5)

 line to likfunc.cpp (minus the space between "round" and "(x)") and now everything seems to be compliling OK. Thanks!

  By the way, I did try to post this query on the bugzilla but during the account registration process I never got the password in my mail. I´m guessing my email software is becoming too paranoid or something, and I´ll try to look into that, but just thought I'd bring that up in the discussion board in case somebody is having similar problems.

 Cheers,

 Leon

Title: Re: Undeclared identifier in likefunc.cpp
Post by Sergei on Jun 20th, 2006 at 7:56pm
Dear Leon,

Bugzilla issues are because I didn't configure the mail backend quite properly (sometimes it doesn't work). One of these days, I'll actually fix it. Thanks for reporting the issue though!

Best,
Sergei

HyPhy message board » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2024. All Rights Reserved.