Fatal Error: SWI-Stream.h - No Such file or directory

Hi all, trying to utilise mqtt pack for prolog and receiving this error:

make CC=gcc
gcc -O2 -g -Wall -fno-strict-aliasing -pthread -fPIC -std=c99  -I. -Iext/include     -c -o c/mqtt.o c/mqtt.c
c/mqtt.c:14:10: fatal error: SWI-Stream.h: No such file or directory
   14 | #include <SWI-Stream.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: c/mqtt.o] Error 1

This is the same for when I run it in my prolog code:

Any idea on how I fix this?

I can reproduce the problem on Debian (when I tried pack_rebuild(mqtt)). Looking at the Makefile, I don’t know if it would work on Windows (I am not a Windows expert).

You might get some ideas here: Creating a pack that uses C or C++ code

EDIT: you might also try building the foreign language executable manually – See the section on swipl-ld in SWI-Prolog -- Manual