This is my directory structure:
C:.
│ lodepng.h
│ lodepng.c
│ nim.cfg
│ test.png
│ util.nim
│
└───nimcache
util nim is importing a c function from lodepng.h like this:
proc loadPNG(image: var ptr[cchar], width, height: var cuint, filename: cstring)
{.importc: "lodepng_decode32_file", header: "lodepng.h".}
But the header is not copied into nimcache nor is found when compiling the code. How can i make sure nim compiler uses it?
I found the solution inside the nim backend integration guide: