Skip to content

error: ‘isnan’ was not declared in this scope #1

@Zauberfisch

Description

@Zauberfisch

Building fails for me with the error message:

g++ -Ofast -std=c++11 -Wall -Wno-unused-function -I/usr/local/include/ -I/usr/include `pkg-config --cflags jack` `pkg-config --cflags libpulse` -c jack_volume.cpp -o jack_volume.o
jack_volume.cpp: In member function ‘void jack_volume::channel_lin(int32_t, float)’:
jack_volume.cpp:163:14: error: ‘isnan’ was not declared in this scope
   JV_ASSERT(!isnan(new_gain_lin), "new_gain_lin is not a number");
              ^~~~~
jack_volume.cpp:24:37: note: in definition of macro ‘JV_ASSERT’
 #define JV_ASSERT(cond, msg) if (! (cond)) throw std::runtime_error(msg)
                                     ^~~~
make: *** [Makefile:35: jack_volume.o] Error 1

gcc --version: gcc (GCC) 8.2.1 20181127
uname -a: Linux fishbowl-g1 4.19.13-1-MANJARO #1 SMP PREEMPT Sat Dec 29 15:43:56 UTC 2018 x86_64 GNU/Linux

Given that this is just input validation, I removed that line and was then able to compile it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions