Sysprogs forums › Forums › VisualGDB › C++ 17 issue Intellisense
- This topic has 3 replies, 2 voices, and was last updated 4 years ago by
paulh001.
-
AuthorPosts
-
February 9, 2022 at 15:27 #32165
paulh001
ParticipantI use visualgdb to develop for raspberry pi 4 bullseye.
The steps I execute are
- Create a new linux project compile on raspberry pi and store files on Windows PC. Use MSBuils and Ninja as build tools
- Add some source code (does not matter as long correct C++ 1.7). I copy a feature test code from https://en.cppreference.com/w/cpp/feature_test
- Switch C++ compiler to C++17 with GNU extensions
- Now Intellisense suggest to add include files. (/usr/include/arm-linux-gnueabihf/c++/10;/usr/include/c++/10;/usr/include/c++/10/tr1;/usr/include/linux;%(ClCompile.AdditionalIncludeDirectories)_
- Compile code -> error /usr/include/c++/10/bits/move.h:76:27: error: ‘remove_reference’ in namespace ‘std’ does not name a template type
76 | forward(typename std::remove_reference<_Tp>::type& __t) noexcept
Intellisense has added the wrong include files. How to configure VisualGDB correct for C++17 ? Without intellisense adding the wrong include files all the time?
Do I need to config intellisense also for C++17?
Attachments:
You must be logged in to view attached files.February 9, 2022 at 15:36 #32168paulh001
ParticipantWhen I remove /usr/include/c++/10/tr1 it compliles ok. But intellisense keeps asking to add it
February 9, 2022 at 19:32 #32175support
KeymasterHi,
This looks like something specific to your target (e.g. some headers got moved or edited).
The easiest way to fix it would be to delete the cached include directories for that target (via VisualGDB Project Properties or by deleting %LOCALAPPDATA%\VisualGDB\RemoteSourceCache\<hostname>) and rebuilding the MSBuild toolchain profile (VisualGDB Project Properties -> MSBuild -> Regenerate MSBuild Files).
If it doesn’t help, please try locating the %LOCALAPPDATA%\VisualGDB\ToolchainProfiles\<hostname>\com.sysprogs.toolchain.default-gcc-\IntelliSense.props file. It contains the include directories and preprocessor macros used to configure IntelliSense based on various options (e.g. language standard). You can simply add the /usr/include/c++/10/tr1 directory to the AdditionalIncludeDirectories element (or even make it conditional on CPPLanguageStandard, similar to PreprocessorDefinitions). Editing the file and reopening the solution will make the directory visible to IntelliSense without affecting the build.
February 10, 2022 at 00:30 #32176paulh001
ParticipantThanks, looks like rebuilding remote source cache did the trick.
-
AuthorPosts
- You must be logged in to reply to this topic.