Remote headers are not found

Sysprogs forums Forums VisualGDB Remote headers are not found

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #12856
    illera88
    Participant

    I 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

    #12857
    support
    Keymaster

    Hi,

    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.

    #12859
    illera88
    Participant

    The 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!

    #12860
    support
    Keymaster

    Hi,

    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.

    #12861
    illera88
    Participant

    Works like a charm. Thank you

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.