Prob.h:23: parse error before `throw'

Andreas Stolcke stolcke at speech.sri.com
Wed Aug 8 10:17:03 PDT 2001


For now, just remove the whole 'extern "C"' construct.

--Andreas

In message <Pine.LNX.4.21.0108081607540.14371-100000 at linux14.phonetik.uni-muenc
hen.de>you wrote:
> Hi,
> 
> when I try to compile the SRILM I get the following error message:
> 
>   make[2]: Entering directory `/home/weilkar/VM-LM/SRI-lm-toolkit/lm/src'
>   g++ -mcpu=i686 -Wreturn-type -DINSTANTIATE_TEMPLATES
>   -I. -I/homes/weilkar/VM-LM/SRI-lm-toolkit/include   -c -g -O2 -o
>   ../obj/i686/ngram.o ngram.cc
>   In file included from NBest.h:17,
>                    from ngram.cc:27:
>   Prob.h:23: parse error before `throw'
> 
> This is caused by the follwing code-segment in Prob.h
> 
>   extern "C" {
>     double atof(const char *) __THROW;
>   
>   #ifdef __THROW
>       __THROW __attribute_pure__
>   #endif
>     ;	/* might be missing from math.h or stdlib.h */
>   }
> 
> I am using 
>   gcc version 2.95.2 19991024 (release)
>   SuSe Linux 7.0 
>   Kernel 2.2.16
>   GNU libc 2.1.3
> 
> What changes do I have to make to fix this problem?
> 
> regards
> 
> Karl 
> 
> ----------------------------------------------------------------------------
> Karl Weilhammer 
> Institut fuer Phonetik und Sprachliche Kommunikation
> Ludwig-Maximilians-Universitaet Muenchen         Tel.: +49-(0)89-2180-2454
> Schellingstr. 3                                  Fax : +49-(0)89-2800362
> 80799 Muenchen                 Email: weilkar at phonetik.uni-muenchen.de
> GERMANY                        www  : http://www.phonetik.uni-muenchen.de/
> ----------------------------------------------------------------------------
> 




More information about the SRILM-User mailing list