03-18-2019, 12:29 PM
(This post was last modified: 03-18-2019, 08:29 PM by Brian Beuken.)
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
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
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