VexCode Pro "Non-Portable Path"

This is kind of an extension from this old thread. Same github - centre project, but different problem. I suggest you read that thread and come back, since it has important information to understand this problem.

I’ve found a temporary solution to the old thread: replacing the #includes with "../core/include/file.hpp" to back out of the “include” folder and into the core/include folder. However, there’s a new problem. Initially, this seemed to fix the problem, but now I have the warning “[clang] Non-Portable path to file” on the includes, and prompts me to change it to "../Core/include/file.hpp" (note the capital C), despite the actual folder “core” being lowercase.

editor issues

This would be fine itself, but vexcode is not updating it’s index (or something) whenever I change the header file. You can see in the image “pop” is not found, despite the fact I changed the variable state_list from a std::vector to a std::queue. These errors are making it very hard to spot actual errors.

Removing the file from the project .v5 file and re-importing it works short-term, but the error comes back whenever I change the header file. I doubt there is much I can do to fix this, so I guess this is more like a bug report than a help post. But hey, if y’all have any ideas I’m open to suggestions.

If the github project is public, send me a link.

I tried to reproduce on a Mac, and it seems fine. clangd on windows can have lots of issues with large projects, the lvgl VEXcode builds I have cause clangd to crash all the time, that’s mostly because we still use the 32 bit version of clangd so we can support all necessary platforms. I’ll try on windows tomorrow if I have time.

but I have no idea why it’s confusing upper and lower case versions of “Core”

4 Likes

Why not just edit the makefile to add core/include to the include paths?

Here’s the link to the Repo. I’m currently testing in windows.

1 Like

I can add core/include to the makefile include path and it builds just fine, but the in-editor live error / completion doesn’t take that path into account. The ideal solution would be for the editor to read the makefile for it’s code-completion, but unfortunately it’s not done this way, and that’s up to the VexCode Pro devs.

hence the stop-gap solution for using “…/core/include”. It ~somewhat~ works, as long as the header file never changes.

Interestingly enough, I closed VexCode, cleared the windows AppData\Local\Temp directory, and all occurrences of Vexcode from AppData, did a Make Clean, and re-opened VexCode and the editor still thought state_list was a std::vector

I forget exactly the command to do it, but it sounds like you need to regenerate compile-commands.json

Tried your project on a Mac, messed with headers etc, for a while, everything seems to work as intended.

compile-commands.json in VEXcode cannot be regenerated as such, it does not use makefile definitions.

I’ll try as I said on Windows at some point, my but best guess is issue with windows 32 bit clangd.

3 Likes

Do you know of a way to manually set the include path for VexCode? Cause that would basically solve all my problems

Either that, or is there a way to upload the compiled program via the terminal? Because if so, I already have a VS Code environment set up

I tried you project under windows 10, I can’t reproduce any problems.

there is no simple way to change the include paths in the compile-commands.json file that VEXcode creates every time you save the project. You could potentially edit this file and set as read only, but I’ve never tried that.

3 Likes