analogdevicesinc / iio-oscilloscope

A GTK+ based oscilloscope application for interfacing with various IIO devices

Home Page:https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error: use of undeclared identifier 'M_PI'

yurivict opened this issue · comments

/usr/ports/misc/iio-oscilloscope/work/iio-oscilloscope-0.16-master/oscplot.c:898:20: error: use of undeclared identifier 'M_PI'
                double a = 2.0 * M_PI / (n - 1);
                                 ^
/usr/ports/misc/iio-oscilloscope/work/iio-oscilloscope-0.16-master/oscplot.c:909:14: error: use of undeclared identifier 'M_PI'
                double a = M_PI * j / (n - 1);
                           ^

Removing -D_POSIX_C_SOURCE=200809L removes these errors.

Version: 0.16
clang-15
FreeBSD 13.2

M_PI is defined in the the math.h header, check if your system defines them somewhere like /usr/include/math.h, and if CMake is including the system headers properly.

This looks like a system headers error.

Thank you for your help.

Closing this, then.