'isinf' was not declared in this scope

Please post support and help requests here.
Posts: 1
Joined: 21 Mar 2013, 12:49

'isinf' was not declared in this scope

Postby ael08aal » 21 Mar 2013, 16:44

I am trying to build a project in eclipse for Android using JNI and Poco C++ JSON and Poco C++ Foundation libraries.

When I try to build I get two different errors, the first one I get three times and the second error "only" once:

Description Resource Path Location Type
'isinf' was not declared in this scope JSONParserCpp line 103, external location: C:\...\poco-1.5.1-all\Foundation\include\Poco\FPEnvironment_C99.h C/C++ Problem

Description Resource Path Location Type
make: *** [obj/local/armeabi/objs/JSONParserCpp/JSONParserCpp.o] Error 1 JSONParserCpp C/C++ Problem

In my Android make-file I have included the two prebuilt libraries (libPocoJSON.a and libPocoFoundation.a) and use them as local static libraries in the shared library that I build (last in the make-file).

There is apparently some file that includes FPEnvironment_C99.h (in Foundation) which in turn includes <math.h> (because FPEnvironment_C99 uses isinf). I have several different math.h on my computer where the one in the subdirectory to my ndk-directory defines isinf and this subdirectory is in the projects path. In my Application.mk file however I use APP_STL := stlport_static (see complete Application.mk below) and there is a math.h in a subdirectory to the stlport directory, but that math.h does NOT define isinf.
This latter one is however also in the projects paths and it seems like neither one of them can be removed (and I don't know if any of them should be). I get the feeling that the compiler does not find the right math.h.

APP_PLATFORM := android-8
APP_OPTIM := release
APP_ABI := armeabi
APP_STL := stlport_static
APP_CPPFLAGS := -frtti -fpermissive -fexceptions

APP_MODULES := PocoFoundation PocoJSON JSONParserCpp


Does anyone have a clue of what may be causing the two problems?
I know it may be difficult to answer and I may have omitted/forgotten some important information - then please ask!
I would be very greateful for help!

Posts: 1375
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: 'isinf' was not declared in this scope

Postby alex » 21 Mar 2013, 17:21

Yes, see Github issue 57.

Posts: 17
Joined: 11 Mar 2013, 16:10

Re: 'isinf' was not declared in this scope

Postby devdavid » 22 Mar 2013, 12:25

You need to change the header mentioned in the error to use std::isinf() or use gnustl_static.

The reason you get this error is probably because you have defined APP_STL := stlport_static instead of gnustl_static.

Return to “Support”

Who is online

Users browsing this forum: No registered users and 5 guests