r-lib/tree-sitter-r

Requisites for generating the shared library

iagogv3 opened this issue · 4 comments

I am trying to generate the shared library from the files parser.c and scanner.c (after renaming it from scanner.cc, shouldn't?) in the next branch, through

gcc -o r.so -shared parser.c scanner.c -Os -fPIC -I .

But I get the issue

  • cwctype: No such file or directory

How should I install it. (I am using gcc from Rtools43)

No, it's a C++ file and so would be compiled by a C++ compiler.

Ok! Using g++ instead, I get different errors repeated multiple times, for example:

parser.c:512343:1: error: designator order for field ‘TSParseAction::<unnamed struct>::child_count’ does not match declaration order in ‘TSParseAction::<unnamed struct>’

Sorry, but I don't really know what you want to do -- I'd recommend reading the documentation at https://tree-sitter.github.io/tree-sitter/ to see if you can find answers there.