[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Compiling xtide: C++ error



I am running a pretty much up to date hamm system with egcs g++, etc.
Compiling the most recent snapshot of xtide2 (found at
http://www.universe.digex.net/~dave/files) resulted in the following errors.  
The author of the program instantly revised the source file.  I am attaching
his comments.  The copy of xtide-2.0dev.tar.gz now at the site probably has
these changes already in place.  This is beta software, by the way.  Very
interesting beta software.


> c++ -O2 -fno-strength-reduce    -I/usr/X11R6/include -I/include  -Dlinux
> -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE=500L
> -D_BSD_SOURCE -D_SVID_SOURCE -D_REENTRANT       -c Station.cc -o Station.o
> Station.cc: In method class Timestamp Station::next_high_or_low_tide(class
> Timestamp, int &, enum Station::Direction)':
> Station.cc:340: no matching function for call to Station::next_zero
> (Timestamp &, PredictionValue (Station::)(Timestamp, unsigned int), int &,
> Amplitude, Amplitude, Station::Direction &)'
> Station.cc:215: candidates are: Station::next_zero(Timestamp,
> PredictionValue (Station::*)(Timestamp, unsigned int), int &, Amplitude,
> Amplitude, Station::Direction)
> Station.cc: In method class Timestamp Station::find_mark_crossing(class
> Timestamp, class Timestamp, int &, enum Station::Direction)':
> Station.cc:375: no matching function for call to Station::find_zero
> (Timestamp &, Timestamp &, PredictionValue (Station::)(Timestamp, unsigned
> int), Station::Direction &)'
> Station.cc:108: candidates are: Station::find_zero(Timestamp, Timestamp,
> PredictionValue (Station::*)(Timestamp, unsigned int), Station::Direction)
> make: *** [Station.o] Error 1


The author's comments:

> I think this is fixable.  The problem is with the function being
> passed as an argument.  I have seen this problem before; GCC quietly
> hides the type mismatch while other compilers choke on it.  (Usually
> Sparcworks chokes on it, but this time it didn't.)
>  
> Please try variations on the syntax in lines 340 and 375 (actually 339
> and 375) and let me know what works.  Here is the original 339:
>   
>      Timestamp thilo = next_zero (t, f_hiorlo, rising,
>      
>      Things to try:
>       
>        Timestamp thilo = next_zero (t, &f_hiorlo, rising,
>        Timestamp thilo = next_zero (t, (PredictionValue (Station::*)(Timestamp,
> 	  +unsigned int))(f_hiorlo), rising,
>        Timestamp thilo = next_zero (t, (PredictionValue (Station::*)(Timestamp,
> 	    +unsigned int))(&f_hiorlo), rising,
> 	     
> If none of these work, it can still be fixed by making f_hiorlo a
> regular old not-in-any-class type of function.  This is what I already
> did for all of the X toolkit callbacks to avoid exactly this issue,
> and I should probably just do that for these as well.
> 	      
> What compiler are you using now, anyway?


I am now recompiling.  Station.cc compiled ok.

I post this information for the benefit of those who may be able to make use
of it, not because I understand a single bit of it.

Alan 





	      


-- 
Alan E. Davis                       Marianas High School (Science Department)     
AAA196, Box 10001    adavis@netpci.com   http://www.saipan.netpci.com/~adavis   
Saipan, MP  96950    15.16oN 145.7oE    GMT+10       Northern Mariana Islands


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: