ResourceScope missing OS/X

Duncan Gittins duncan.gittins at gmail.com
Sun Mar 26 10:07:09 UTC 2023


It looks like you have used jextract which was not built for JDK20,as
ResourceScope class is from earlier JDK version.
You'll need to build and generate with a JDK20 compatible jextract or wait
for the team to drop a compatible build here: https://jdk.java.net/jextract/

Kind regards

Duncan


On Sat, 25 Mar 2023 at 23:25, Michael Hall <mik3hall at gmail.com> wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jextract-dev/attachments/20230326/553b62da/attachment.htm>


More information about the jextract-dev mailing list