c-for-go
c-for-go copied to clipboard
stdint.h failing
When compiling with command: c-for-go --ccincl --ccdefs vgo.yml
Getting the errors:
processing vgo.yml ⠙/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/stdint.h:20:43: unexpected '<', expected optional argument expression list or one of [&&, '!', '&', '(', ')', '*', '+', '-', '~', ++, --, _Alignof, character constant, floating-point constant, identifier, integer constant, long character constant, long string constant, sizeof, string literal]
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/stdint.h:175:10: cannot redefine macro using a different replacement list
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/stdint.h:176:10: cannot redefine macro using a different replacement list
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/stdint.h:177:10: cannot redefine macro using a different replacement list
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/stdint.h:178:10: cannot redefine macro using a different replacement list
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/stdint.h:179:10: cannot redefine macro using a different replacement list
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/stdint.h:180:10: cannot redefine macro using a different replacement list
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/stdint.h:208:10: cannot redefine macro using a different replacement list
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/stdint.h:209:10: cannot redefine macro using a different replacement list
/Library/Developer/CommandLineTools/usr/lib/clang/12.0.5/include/stdint.h:210:10: cannot redefine macro using a different replacement list
too many errors
When compiling with the command c-for-go --ccincl vgo.yml
Errors:
vgo.c:529:62: undefined: __builtin_object_size
vgo.c:529:62: undefined: __builtin___memcpy_chk
vgo.c:529:62: called object is not a function or function pointer (have '<undefined>')
vgo.c:529:62: called object is not a function or function pointer (have '<undefined>')
vgo.c:529:87: undefined: __builtin_bswap64
vgo.c:529:87: called object is not a function or function pointer (have '<undefined>')
vgo.c:530:62: undefined: __builtin_object_size
vgo.c:530:62: undefined: __builtin___memcpy_chk
vgo.c:530:62: called object is not a function or function pointer (have '<undefined>')
too many errors
Without --ccincl it just says a bunch of headers are missing.
Config:
GENERATOR:
PackageName: vgo
PackageDescription: "Description thing yeah"
PackageLicense: "Cool licence, check v.mod"
PkgConfigOpts: []
Includes: ["vgo.c"]
Options:
SafeStrings: true
PARSER:
IncludePaths: ["/usr/include", "/usr/local/include"]
SourcesPaths: ["vgo.c"]
TRANSLATOR:
ConstCharIsString: true
ConstUCharIsString: false
ConstRules:
defines: eval
PtrTips:
function:
- {target: "vorbis_synthesis_pcmout$", tips: [ref,arr]}
- {target: ^vorbis_, tips: [ref,ref,ref]}
- {target: ^ogg_, self: arr, tips: [ref,ref]}
Rules:
global:
- {transform: lower}
- {action: accept, from: "^vgo__"}
- {action: replace, from: "^vgo__", to: _}
- {transform: export}
const:
- {action: accept, from: "^vgo__"}
- {action: replace, from: "^vgo__", to: _}
type:
- {action: replace, from: "_t$"}
private:
- {transform: unexport}
post-global:
- {action: replace, from: _$}
- {load: snakecase}
Did you end up finding a solution for this? I've got the same issue
No, I didn't find a solution, hoping someone does