Skip to content

ClangSharpPInvokeGenerator annoys me if it can't find to path to stddef.h #468

Description

@DeafMan1983

Hello everyone,

I have big problem. It seems not working if I want generate to C#

 ClangSharpPInvokeGenerator --file /usr/include/SDL2/SDL.h --traverse /usr/include/SDL2/SDL.h -n SDL2Interop --methodClassName SDL2 --libraryPath /usr/lib/x86_64-linux-gnu -o ./SDL2Interop.cs
Diagnostics for '/usr/include/SDL2/SDL.h':
    /usr/include/x86_64-linux-gnu/sys/types.h:144:10: fatal error: 'stddef.h' file not found
Skipping '/usr/include/SDL2/SDL.h' due to one or more errors listed above.

I already installed which version if I use Ubuntu 22.04.3 with Clang-14 or Clang-15
locale stddef.h
Result:

/opt/rocm-5.5.3/llvm/lib/clang/16.0.0/include/stddef.h
/usr/include/linux/stddef.h
/usr/include/x86_64-linux-musl/stddef.h
/usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h
/usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h
/usr/lib/llvm-15/lib/clang/15.0.7/include/stddef.h
/usr/src/amdgpu-6.2.4-1637781.22.04/include/kcl/kcl_stddef.h
/usr/src/linux-hwe-6.2-headers-6.2.0-31/include/linux/stddef.h
/usr/src/linux-hwe-6.2-headers-6.2.0-31/include/uapi/linux/stddef.h

Amdgpu development kit requires for rocm dkms compilation with new kernel 6.2 that is why I shouldn't remove it. It is very important for rocm dkms

How do I know if ClangSharpPInvokeGenerator can't find where does stddef.h install on Ubuntu 22.04.

// EDIT:
I have tried - no success :( I am very disappointed now @tannergooding I have tried to use -I or -std.

I don't want wait for nothing.... :(

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions