Closed kojix2 closed 3 years ago
Probably this is not the first error... rather, c2ffi isn't finding a platform-specific header that stdint.h
requires. Currently only some guesswork is done about header locations; #89 is doing work to fix this, but I haven't had a chance to swing back around (hopefully this week). You can manually specify system header locations with -i
(or try that PR!).
Thanks for your reply. I tried the pull request #89. It works fine on my computer.
c2ffi foo.c -o foo.json 2> foo.log
tail of foo.json
{ "tag": "function", "name": "foo", "ns": 0, "location": "foo.c:4:5", "variadic": false, "inline": false, "storage-class": "none", "parameters": [{ "tag": "parameter", "name": "bar", "type": { "tag": "uint8_t" } }], "return-type": { "tag": ":int", "bit-size": 32, "bit-alignment": 32 } },
{ "tag": "function", "name": "main", "ns": 0, "location": "foo.c:9:5", "variadic": false, "inline": false, "storage-class": "none", "parameters": [], "return-type": { "tag": ":int", "bit-size": 32, "bit-alignment": 32 } }
]
No error.
This issue has been resolved.
If I have any questions, please let me ask you again. Have a nice day.
Hello.
I'm trying to use c2ffi. When I run c2ffi on the following file, I get the following error. From the error message, it is assumed that c2ffi is unable to recognize
uint8_t
. Maybe I am missing something basic. I would appreciate it if you could tell me how to make it work.foo.c
Run c2ffi
Error
Thank you.