Hello,
According to a previous question (How to get rid of a nimsuggest error from a ".compile:" pragma) I am changing a compile pragma path to a relative path in order to make nimsuggest happy. However, the paths I need seem to be incorrect, even though compilation works.
Case in point, I have the following source code file:
/home/hmf_x/VSCodeProjects/nim_learn/funim_glfw/funim_glfw.nimble
and I need to add a compile pragma to compile the following C source file:
/home/hmf_x/VSCodeProjects/nim_learn/funim_glfw/src/glad/src/gl.c
I would assume that either of the following relative paths should work:
{.compile: "./src/glad/src/gl.c".}
{.compile: "src/glad/src/gl.c".}
But nimsuggest reports an error saying the file cannot be found. However, compilation works just fine.
The following does work (no nimsuggest errors and compilation works):
{.compile: "../src/glad/src/gl.c".}
Why do I need to move up a level and then down again? Maybe I am missing something obvious here. Can anyone explain?
TIA
I am using it via the VSCode IDE.
Now that you point it out, I am working on a single repository that has multiple nimble projects. Each project has its own root folder and source sub-folders. Each root folder has its own nimble build script, config.nims and nimble.paths.
This may not be what the extension expects and may explain the errors I am getting. I will experiment in the future by placing this project in its own repository and see what happens.
Thank you.
I am using:
https://marketplace.visualstudio.com/items?itemName=NimLang.nimlang
and considered it the "reference" solution, but yes will explore some others.