Sysprogs forums › Forums › VisualGDB › Remote headers are not found
- This topic has 4 replies, 2 voices, and was last updated 7 years, 11 months ago by
illera88.
-
AuthorPosts
-
November 5, 2017 at 16:35 #12856
illera88
ParticipantI created a Linux project that uses curl.
The problem is that the curl headers are not imported/found even when they exist in the remote linux system and the program does not compile getting an error:
Error [Clang IntelliSense] Error: ‘curl/curl.h’ file not found main.c
If I run exactly the same code in the remote machine it compiles fine since I already installed curl in it (plus adding -lcurl for the linker).
Shouldn’t VisualGDB get the curl headers automatically since they are installed and therefore in the path?
Thank you
November 5, 2017 at 18:03 #12857support
KeymasterHi,
Please try synchronizing the header directories (via IntelliSense Settings page of VisualGDB Project Properties). This will ensure VisualGDB has access to the latest versions of all headers.
You can also try creating an advanced CMake project (requires VisualGDB 5.3) that will access the remote filesystem directly over SSH; this will eliminate the need to synchronize any headers or source files.
November 5, 2017 at 18:15 #12859illera88
ParticipantThe headers are already in the remote server. So it should compile when I click on build since the compilation happens in the Linux system even if the curl headers are not in the local(Windows) system right?
I haven’t seen any “synchronizing” method in the IntelliSense page. What I see is that I can add local (in the Windows system) paths for Intelligense to look for headers. But my problem is not that IntelliSense does not work but that the compilation does not go through. Why are curl headers not found when they are actually in the path in the linux system?
Thank you!
November 5, 2017 at 20:03 #12860support
KeymasterHi,
Sorry for the confusion. We will try to explain how VisualGDB manages IntelliSense headers.
When you create your first project built on a remote Linux machine, VisualGDB creates a local Windows cache of the related header directories, so IntelliSense can parse them automatically. If you later install more packages to your Linux system, the headers installed by them won’t automatically be downloaded, leading in the error you are describing: the code would build, but IntelliSense would not find headers.
This could be fixed by letting VisualGDB rebuild the header directory cache. The exact wording of the command depends on your VisualGDB version and the project type, but the option is located on the IntelliSense Directories page of VisualGDB Project Properties (e.g. ‘Reload all directories’). If you are not sure, please attach a screenshot of that page and we will help you find the correct settings.
November 6, 2017 at 08:25 #12861illera88
ParticipantWorks like a charm. Thank you
-
AuthorPosts
- You must be logged in to reply to this topic.