Register

Can't compile Reckon for 9860GII

Discuss issues related to the fx-9860G Software Development Kit
Junior Member
Posts: 2
Joined: Thu Jun 14, 2018 4:45 pm
Calculators: Casio fx-9750 G II (SH4)

Can't compile Reckon for 9860GII

Postby siealex » Thu Jun 14, 2018 4:50 pm

https://github.com/voidware/reckon

I downloaded the project, put it in a folder and then tried to build. SDK throws four errors:
Code: Select all
D:\fx9750g\reckon-master\cutils.h(50) : C2500 (E) Illegal token "int"
D:\fx9750g\reckon-master\cutils.h(50) : C2500 (E) Illegal token "const"
D:\fx9750g\reckon-master\cutils.h(50) : C2500 (E) Illegal token "n"
D:\fx9750g\reckon-master\cutils.h(51) : C2500 (E) Illegal token "{"


What does it mean? The function definition does not contain anything odd. Here is the content of this file (without comments), line 50 is the function header starting with "inline".

Code: Select all
#ifndef __cutils_h__
#define __cutils_h__

#ifdef __cplusplus
extern "C" {
#endif

#ifndef DIM
#define DIM(_x)  (sizeof(_x)/sizeof(_x[0]))
#endif

// define our own set here
#define u__tolower(_c)    ( (_c)-'A'+'a' )
#define u__toupper(_c)    ( (_c)-'a'+'A' )

#define u_tolower(_c)     (u_isupper(_c) ? u__tolower(_c) : _c)
#define u_toupper(_c)     (u_islower(_c) ? u__toupper(_c) : _c)

#define u_isalpha(_c)  (u_isupper(_c) || u_islower(_c))
#define u_isupper(_c)  (((_c) >= 'A') & ((_c) <= 'Z'))
#define u_islower(_c)  (((_c) >= 'a') & ((_c) <= 'z'))
#define u_isdigit(_c)  (((_c) >= '0') & ((_c) <= '9'))
#define u_isspace(_c)  (((_c) == ' ') | ((_c) == '\t') | ((_c) == '\n'))
#define u_isalnum(_c)  (u_isalpha(_c) || u_isdigit(_c))
#define u_isprint(_c)  (((_c) >= 0x20) & ((_c) <= 127))

inline int u_strnicmp(const char* s1, const char* s2, size_t n)
{
    int v = 0;
    while (n)
    {
        --n;

        int c1 = *s1;
        int c2 = *s2;

        if (u_isupper(c1)) c1 = u_tolower(c1);
        if (u_isupper(c2)) c2 = u_tolower(c2);
       
        v = (c2 - c1);
        if (v || !*s1) break;
        ++s1;
        ++s2;
    }
    return v;
}

#ifdef __cplusplus
};
#endif



#endif // __cutils_h__

Junior Member
Posts: 9
Joined: Mon May 20, 2013 1:17 pm
Calculators: Casio fx-CG 20

Re: Can't compile Reckon for 9860GII

Postby Nemhardy » Sun Jun 17, 2018 2:23 pm

I'm actually kind of surprised because function inlining is a C99 feature, and as far as i know the compiler in the Casio's SDK only supports up to C89… What happens when you try to remove the `inline` attribute ?

Junior Member
Posts: 2
Joined: Thu Jun 14, 2018 4:45 pm
Calculators: Casio fx-9750 G II (SH4)

Re: Can't compile Reckon for 9860GII

Postby siealex » Sun Jun 17, 2018 3:46 pm

The author fixed this two days ago (along with some other bugs). He compiled it with GCC and not Casio SDK. Now everything is fine except one problem: to use it on 9860GII/9750GII it is necessary to disable IsSlim() function (hardcode return 0 into it).

Return to Casio fx-9860 SDK

Who is online

Users browsing this forum: No registered users and 7 guests