Menu

#13 pow10 not defined on OS/X

OSX compatibility
open
nobody
build (1)
1
2018-11-26
2016-01-02
David
No

pow10 is a GNU extension and is not available when compiling on OS/X. See also https://www.gnu.org/software/gnulib/manual/html_node/pow10.html

Compiliation will fail with:

/tmp/eq10q20160102-31939-1ptphs5/eq10q-2.0/gui/widgets/bandctl.cpp:948:12: error: use of undeclared identifier 'pow10'
    val *= pow10(3.0 - str.length());

An workaround would be to rely on pow(10, x) instead.

Discussion

  • Pere Ràfols Soler

    I was not interested in providing a version for OSX because I don't have acces to this OS. However, following your sugestions I will try to do my code more portable. I will include your tips in next releases. Thanks for your work!

     
  • Pere Ràfols Soler

    • Group: v2.1 Bugs --> OSX compatibility
     
  • David Runge

    David Runge - 2018-11-26

    @sapista: without changing this, eq10q will not compile on current Linux kernels!
    Please use the standardized exp10() instead, as pow10() is very much on its way out and release a new version!

     

Log in to post a comment.

MongoDB Logo MongoDB