Ikaro
Ikaro

Reputation: 165

Native image with gluonfx fails if I use org.graalvm.nativeimage.c

I have a JavaFx project that I am compiling to native with no problems using GluonFx.

I recently had to add a feature that uses a DLL through to make use of its native functions. I have done this through GraalVm using this solution: https://yyhh.org/blog/2021/02/writing-c-code-in-javaclojure-graalvm-specific-programming/

Now when trying to compile to native with gluonfx:build I am getting the following error:

[Project source] package org.graalvm.nativeimage.c does not exist
[Project source] package org.graalvm.nativeimage.c.function does not exist
[Project source] package org.graalvm.nativeimage.c.function does not exist
[Project source] package org.graalvm.nativeimage.c.struct does not exist
[Project source] package org.graalvm.nativeimage.c.struct does not exist
[Project source] package org.graalvm.nativeimage.c.type does not exist
[Project source] package org.graalvm.nativeimage.c.type does not exist
[Project source] package org.graalvm.nativeimage.c.type does not exist
[Project source] package org.graalvm.word does not exist
[Project source] cannot find symbol symbol: class CContext
[Project source]cannot find symbol symbol: class CLibrary
.....
.....

Does someone had this issue before? Shouldn't graalvm.nativeimage.c be part of the graalvm sdk?

Thanks in advance

Upvotes: 0

Views: 480

Answers (1)

Ikaro
Ikaro

Reputation: 165

Answered by José Pereda in comments

"Did you add the required dependencies (like org.graalvm.nativeimage:library-support) to the project?"

Adding the dependency solved my problem. Thanks

Upvotes: 1

Related Questions