Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: implicit declaration of function '_strtoi64' #560

Closed
yodapotatofly opened this issue Mar 23, 2020 · 2 comments
Closed

error: implicit declaration of function '_strtoi64' #560

yodapotatofly opened this issue Mar 23, 2020 · 2 comments

Comments

@yodapotatofly
Copy link

Hello all !
Not really sure if it is a real issue or if I'm just dumb. (first time I'm using CMake)

I am trying to use json-c in a windows project but impossible to make it.
I have included the whole repo in my project folder and I am using cmake with MinGW generator
Cmake works fine, but at make, got compilation errors :

D:\ ... \build>make
Scanning dependencies of target json-c
[  5%] Building C object json-c/CMakeFiles/json-c.dir/arraylist.c.obj
[ 11%] Building C object json-c/CMakeFiles/json-c.dir/debug.c.obj
[ 17%] Building C object json-c/CMakeFiles/json-c.dir/json_c_version.c.obj
[ 23%] Building C object json-c/CMakeFiles/json-c.dir/json_object.c.obj
[ 29%] Building C object json-c/CMakeFiles/json-c.dir/json_object_iterator.c.obj
[ 35%] Building C object json-c/CMakeFiles/json-c.dir/json_pointer.c.obj
[ 41%] Building C object json-c/CMakeFiles/json-c.dir/json_tokener.c.obj
[ 47%] Building C object json-c/CMakeFiles/json-c.dir/json_util.c.obj
D:\ ... \json-c\json_util.c: In function 'json_parse_int64':
D:\ ... \json-c\json_util.c:44:19: error: implicit declaration of function '_strtoi64'; did you mean '_stati64'? [-Werror=implicit-function-declaration]
 #  define strtoll _strtoi64
                   ^~~~~~~~~
D:\ ... \json-c\json_util.c:228:8: note: in expansion of macro  strtoll'
  val = strtoll(buf, &end, 10);
        ^~~~~~~
D:\ ... \json-c\json_util.c: In function 'json_parse_uint64':
D:\ ... \json-c\json_util.c:45:20: error: implicit declaration of function '_strtoui64'; did you mean '_stati64'? [-Werror=implicit-function-declaration]
 #  define strtoull _strtoui64
                    ^~~~~~~~~~
D:\ ... \json-c\json_util.c:245:8: note: in expansion of macro  strtoull'
  val = strtoull(buf, &end, 10);
        ^~~~~~~~
cc1.exe: all warnings being treated as errors
make[2]: *** [json-c/CMakeFiles/json-c.dir/json_util.c.obj] Erreur 1
make[1]: *** [json-c/CMakeFiles/json-c.dir/all] Erreur 2
make: *** [all] Erreur 2
@dota17
Copy link
Member

dota17 commented Mar 24, 2020

This problem does exist and I think this is because the make of mingw is different from it in linux/gcc. I don't know if we should fully support the mingw. Or just ignore this warning?

@hawicz
Copy link
Member

hawicz commented Mar 25, 2020

mingw isn't supported. If you're building on Windows you'll need to use VS

@hawicz hawicz closed this as completed Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants