Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Intellisense issues
#1
Oh this is a good one, one of my students was struggling with lots of errors being tossed out that it could not find GLuint or glm. It appearred to be unable to find the files and associated variable types.

This in part was true, however it was Visual Studio's intellisense that was getting things mixed up and in his case he had a genuine minor code error, which resulted in a failure to compile. His error list however was throwing up all the cannot find file issues and he assumed that there was some issue there and didn't get into his code

So his true minor error, was hidden under dozens of other errors, which in fact were not errors, but reports from intellisense. scary.

The error itself was highlighted clearly in his compiler output window, since it reported the compilers issues, which is better to check than the error window which reports visual studios issues, including intellisense. You can filter just the build errors though.

The reasons for this are somewhat annoying. When you set up a connection to a Pi, or other linux system it is supposed to syncronise the files on the Pi and keep copies of the include files on your Pc to allow intelisense to work, but the connection manager only loads the usr directory....which excludes any addition directories, like bullet or glm as well as some directories unique to Raspbian, such as opt/vc/include which is where GLES2 lives...... so these files appeared to be unreachable and unloadable to VS2017. But when sent to the target to compile they happyily find the directories where we say they are in the directory lists sent with the make file

The sync really should pull in all directories used by the project, so this is an error in the system I will report to Microsoft, perhaps its been fixed in VS 2019. I will review the preview copy

Microsoft do suggest you copy other folders manually, but really its not an obvious fix and I hope they can correct this to allow for an automatic update, like VisualGDB does
https://docs.microsoft.com/en-us/cpp/lin...ew=vs-2017
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#2
And as a follow up, I installed the preview version of VisualStudio 2019 and happy to say it is indeed more aware of the other directories the project references and it update the directories your project uses. though it does load all the base directories too, like /pi/home
Might be wise to specify /pi/home/glm to reduce the number of files your PC keeps track of.

I probably won't update to 2019 just yet, I like to give new version of VS a bit of time to settle and clear out the bugs
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#3
just an update.... that sync is VERY unpredictable, I don't know how they work out what files to pull over to the PC for intellisense to work but it seems to fail miserably to guess the files you need...then it does, then it dosn't....very hit and miss.

I can't for the life of me get it to pull the GLM files over even though I clearly reference them in the projects directory paths and in code. Although it did eventually pull the home directory, which contains GLM, but then intillisense steadfastly refused to accept any concept of knowing what GLM was...it compiled of course, since the compiler is on the target and the directories were set correctly to reference includes and libs.

sigh...this is why I use Visual GDB. So much easier to get up and get running and not have to worry about such things
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#4
What version  of VS are you running?  It looks like there was a fix for a similar issue in VS 2019.

https://developercommunity.visualstudio....ishes.html
Reply
#5
latest 2019 with update, its simply not a stable fix. It syncs fine, but not all the directories that are listed, and its a bit random which ones it links. It has issues with a GLM directory off the Home dir and can't see any X11 or GLES header files, desprite the usr/lib (or opt/vc) directories getting pulled.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#6
Have you checked the permission and ownership of the files and folders where the files that are not being pulled are?
Reply
#7
No, but since they are not being written to, I don't think that should be an option, we only read them into the PC for intellisense reference
Have you used the Visual Studio for Linux with intellisense working totally?
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#8
Working with my students, and trying it out on a couple of other boards the issue seems mostly contained within ARM64 boards and would seem to be a bug of some kind in the VS2019 intellisense... very irritating.

32 bit ARM boards don't appear to have an issue, and intellisense works fine, you may have to update the folders manually if you add more than home and usr, but otherwise its doing its job just fine.

A, not ideal, work around, is to edit your code in ARM mode, which intellisense is happy with, and before building and deploying, set to ARM64 as it builds fine on the 3 ARM64 systems I tried with tonight.

I've put a note on the Visual Studio developers forum, and on the Nvidia Jetson forums, to see if anyone can give a solution (it might be nothing more than a box that needs ticking tucked away in a small drop down)
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#9
It appears that MS have fixed this issue internally and a release with the fix will be available soon. Make sure you update to the latest version.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply
#10
yes the latest version of Visual Studio is now much happier with intellisense, they fixed the ARM64 bug, it still has a few issues with directories but you can use RemoteProjDir instead of ProjectDir to get a bit more direct control over where your code builds and runs from.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's 



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)