I am in the process of adding speex 1.2rc1 to a project of mine, not via compiling as a static library yet including the source and compiling with my own to create a dynamic link library. This worked fine with the last beta release yet is causing problems with this release candidate. The problem is in the file scal.c which is about M_PI being undefined, this file was added to speex in said version. Is there a work around to this which does not involve editing the source of speex or does the library no require that it be compiled separately? Thanks.
The fix is simple: #ifndef M_PI #define M_PI 3.141592653 #endif Otherwise, you can most likely just remove scal.c fron the build. Jean-Marc liam mail a ?crit :> I am in the process of adding speex 1.2rc1 to a project of mine, not > via compiling as a static library yet including the source and > compiling with my own to create a dynamic link library. This worked > fine with the last beta release yet is causing problems with this > release candidate. The problem is in the file scal.c which is about > M_PI being undefined, this file was added to speex in said version. Is > there a work around to this which does not involve editing the source > of speex or does the library no require that it be compiled > separately? > Thanks. > _______________________________________________ > Speex-dev mailing list > Speex-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev > >
If compliling using gcc, you could add "-DM_PI=3.141592653" to the command line used for compiling scal.c, which would be pretty much the same result that Jean-Marc provided, without altering the sources... However, altering the sources is a more elegant solution, and easier to track. On Mon, Sep 15, 2008 at 7:19 AM, liam mail <liam.list at googlemail.com> wrote:> I am in the process of adding speex 1.2rc1 to a project of mine, not > via compiling as a static library yet including the source and > compiling with my own to create a dynamic link library. This worked > fine with the last beta release yet is causing problems with this > release candidate. The problem is in the file scal.c which is about > M_PI being undefined, this file was added to speex in said version. Is > there a work around to this which does not involve editing the source > of speex or does the library no require that it be compiled > separately? > Thanks. > _______________________________________________ > Speex-dev mailing list > Speex-dev at xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev >-- Keith Kyzivat SIPez LLC. SIP VoIP, IM and Presence Consulting http://www.SIPez.com tel: +1 (617) 273-4000 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20080915/ad8355b6/attachment.htm