Skip to content

Can't build native cpp jni library demo #854

@hgourvest

Description

@hgourvest

Can't build native cpp jni library demo

OS: Fedora 38
GCC and CLang are installed with DNF package manager
G++ is used by default.

Is there a way to select CLang instead of GCC ?

> Task :compileCpp FAILED
Dans le fichier inclus depuis /home/henri/Téléchargements/JavaCppJniLibrary-0.5.0-930919a0-groovy-dsl/src/main/cpp/greeter_impl.cpp:2:
/home/henri/Téléchargements/JavaCppJniLibrary-0.5.0-930919a0-groovy-dsl/src/main/headers/greeter.h:10:10: erreur fatale: string : Aucun fichier ou dossier de ce type
   10 | #include <string>
      |          ^~~~~~~~
compilation terminée.

Dans le fichier inclus depuis /home/henri/Téléchargements/JavaCppJniLibrary-0.5.0-930919a0-groovy-dsl/build/generated/jni-headers/com_example_greeter_Greeter.h:2,
                 depuis /home/henri/Téléchargements/JavaCppJniLibrary-0.5.0-930919a0-groovy-dsl/src/main/cpp/greeter.cpp:2:
/usr/lib/jvm/java-17-amazon-corretto/include/jni.h:39:10: erreur fatale: stdio.h : Aucun fichier ou dossier de ce type
   39 | #include <stdio.h>
      |          ^~~~~~~~~
compilation terminée.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions