ResourceScope missing OS/X

Michael Hall mik3hall at gmail.com
Sat Mar 25 23:24:51 UTC 2023


Hello,

I’m trying to compile some OpenGL related code that I generated with jextract. 

I am getting the following errors. I can provide more details if needed.

javac --release 20 --enable-preview -d . opengl/macos/v13_2_1/*.java 
opengl/macos/v13_2_1/__darwin_mbstate_t.java:43: error: cannot find symbol
    public static MemorySegment allocate(ResourceScope scope) { return allocate(SegmentAllocator.nativeAllocator(scope)); }
                                         ^
  symbol:   class ResourceScope
  location: class __darwin_mbstate_t
opengl/macos/v13_2_1/__darwin_mbstate_t.java:44: error: cannot find symbol
    public static MemorySegment allocateArray(int len, ResourceScope scope) {
                                                       ^
  symbol:   class ResourceScope
  location: class __darwin_mbstate_t
opengl/macos/v13_2_1/__darwin_mbstate_t.java:47: error: cannot find symbol
    public static MemorySegment ofAddress(MemoryAddress addr, ResourceScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); }
                                          ^
  symbol:   class MemoryAddress
  location: class __darwin_mbstate_t
opengl/macos/v13_2_1/__darwin_mbstate_t.java:47: error: cannot find symbol
    public static MemorySegment ofAddress(MemoryAddress addr, ResourceScope scope) { return RuntimeHelper.asArray(addr, $LAYOUT(), 1, scope); }
                                                              ^
  symbol:   class ResourceScope
  location: class __darwin_mbstate_t
Note: Some input files use preview features of Java SE 20.
Note: Recompile with -Xlint:preview for details.
4 errors



More information about the jextract-dev mailing list