[speex-dev] Error in compiling Speexdec code (Speex-1.1.5 code) on Windows usingVC++6.0

Chris Flerackers cflerackers at androme.be
Fri May 14 00:58:15 PDT 2004



Error in compiling Speexdec code (Speex-1.1.5 code) on Windows using VC++6.0Hi,

You need to replace the word
inline
with 
__inline

According to Microsoft VC++ 6.0 (MSDN): The inline keyword is available only in C++.
The __inline and __forceinline keywords are available in both C and C++.

BTW, the inline keyword does work on other compilers

Best regards,
Chris
  ----- Original Message ----- 
  From: Asheesh Vashishtha 
  To: speex-dev at xiph.org 
  Sent: Friday, May 14, 2004 9:53 AM
  Subject: [speex-dev] Error in compiling Speexdec code (Speex-1.1.5 code) on Windows usingVC++6.0

<p>  Hi, 

  I've downloaded the Speex-1.1.5 code and am trying to compile the Speexdec code using Microsoft VC++ 6.0 IDE. 
  When I try to open the speexdec.dsw workspace, I get a dialog asking to locate the ogg_static file. I simply cancel that message, and then the project is opened in the VC++ 6.0 IDE.

  Now, when I simply try to compile the program, I receive this 5 error messages. 

  error1. d:\speex\speex-1.1.5\libspeex\lsp.c(104) : error C2054: expected '(' to follow 'inline' 
  error2. d:\speex\speex-1.1.5\libspeex\lsp.c(105) : error C2085: 'spx_cos' : not in formal parameter list 
  error3.d:\speex\speex-1.1.5\libspeex\lsp.c(105) : error C2143: syntax error : missing ';' before '{' 
  error4.d:\speex\speex-1.1.5\libspeex\preprocess.c(974) : error C2143: syntax error : missing ';' before 'type' 
  error 5.d:\speex\speex-1.1.5\libspeex\preprocess.c(1011) : error C2065: 'i' : undeclared identifier 

  The source of the error is this function 

  static inline spx_word16_t spx_cos(spx_word16_t x) 
  { 
     if (x<SPX_PI_2) 
     { 
        x *= x; 
        return C1 + x*(C2+x*(C3+C4*x)); 
     } else { 
        x = M_PI-x; 
        x *= x; 
        return -(C1 + x*(C2+x*(C3+C4*x))); 
     } 
  } 

  Is the definition of this function in someway related to ogg_static file? 

  Please help. 

  Thanks & regards, 
  Asheesh 

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list