Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
Undeclared identifier in likefunc.cpp (Read 2778 times)
Leon
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Undeclared identifier in likefunc.cpp
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

Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: Undeclared identifier in likefunc.cpp
Reply #1 - 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)

 


to likefunc.cpp and recompile.

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
Leon
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Re: Undeclared identifier in likefunc.cpp
Reply #2 - 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
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: Undeclared identifier in likefunc.cpp
Reply #3 - 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
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged