Unable to include header files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to include header files

ammendes
Hi all,

I've been using JOCL with success to GPU-accelerate my Java algorithms.
It seems I'm unable to include header files (e.g., #include <stdio.h>). So far I've gotten away with coding with just basic stuff but at this point I need to do some Fourier transforms and would like to use a library (FFTW).

I use IntelliJ IDEA as an IDE and a Macbook Pro with Big Sur.

Any pointers on how to include these libraries?
Reply | Threaded
Open this post in threaded view
|

Re: Unable to include header files

gouessej
Administrator
Hello

Either use Gluegen + JNI, JNA, JNR or the preview or incubated (depending on your version of Java) Foreign memory access API with or without jextract.

I hope that you know how to use IntelliJ IDEA because we provide almost no guidance about this IDE and anyway, I advise you to understand how to do things without any IDE as this is a tool that should help you to work faster but not something that gets in your way when something doesn't work as expected.

This is an example using JNAErator (found with the search engine DuckDuckGo):
https://gist.github.com/kbarros/1428625
Julien Gouesse | Personal blog | Website