maven-nar / nar-maven-plugin

Native ARchive plugin for Maven
https://maven-nar.github.io/
Apache License 2.0
232 stars 160 forks source link

Importing external library #344

Closed kwek20 closed 5 years ago

kwek20 commented 5 years ago

Hi @ctrueden ! Im trying to use an external library someone is making (using bazel) I get the nar to generate, connect to the jni c class, but the import is always giving me the following error:

[ERROR] fatal error: mam/api/api.h: No such file or directory
[ERROR]  #include <mam/api/api.h>

I have tried many things across most sites, but i feel like im missing something. Could really find more documentation on your site: https://maven-nar.github.io/configuration.html i thought linkerLibs or libsName could be used, but nothing happened.

Im using Maven and Eclipse on Linux 18.04 Any help would be appreciated!

Here is the source code of the project: https://github.com/kwek20/iota-java/tree/mam-v2/mam

kwek20 commented 5 years ago

Ah got it, i probably missed a documentation somewhere:

<configuration>
   <c>
      <includePaths>
         <includePath>/path/to/include</includePath>
      </includePaths>
   </c>
   <!-- Not needed for linking but might as well! -->
   <linker>
      <libs>
         <lib>
            <name>mam</name>
            <type>shared</type>
            <directory>/path/to/lib/directory</directory>
         </lib>
      </libs>
   </linker>
</configuration>