Non-system include paths (i.e. for static libraries, etc.)

Sysprogs forums Forums VisualGDB Non-system include paths (i.e. for static libraries, etc.)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9276
    Ophidian14
    Participant

    Hello all,

    I have a large existing codebase which I would like to try with VisualGDB.  I am using the standard gcc/make toolchain.  The code is structured as follows:

    - Library1
       - Library1.h
       - Library1.cpp
    - App
       - App.cpp

     

    There are already two preexisting Makefiles: one for Library1 which creates a static lib with “ar rcs” and another one that creates an executable with gcc -o App ../Library1/Library1.a.

    Basically it is almost exactly the same as the example given here:

    http://visualgdb.com/tutorials/linux/libraries/

    However, all of the existing code is set up to include headers like this, i.e. from App.cpp:

    #include “Library1.h”

    And this is compensated for by passing a parameter like -I../Library1 to the gcc command for App.

    In the Linux Libraries tutorial the header #include is dealt with using a full relative path i.e. “#include ../Library1/Library.h” (in step #9), but this won’t work for me as I can’t alter the existing build system/paths/etc.

    Without this, Intellisense can’t open Library1.h and highlights it with the red squiggly.  I tried adding it as an Intellisense path, which worked, *however* this seemed to mean that Library1.h was cached locally and if I updated Library1.h as part of my normal editing, my local Intellisense copy was out of sync.  (It also showed up in VS2015 as a “system header” with a light blue tab all the way to the right of my window and I don’t want that either.)

    So my question basically is:  how do I tell VisualGDB for my “App” project where to look for the static library header path, without using local Intellisense caching which is out of date?

    P.S.  I also tried using the “VisualGDB-maintained” Makefile for “App” and added INCLUDE_DIRS := ../Library1.  This caused the build to work, but Intellisense was still not working.

    What to do?

    • This topic was modified 8 years, 1 month ago by Ophidian14.
    #9281
    support
    Keymaster

    Hi,

    If you are using Makefiles, you need to edit them via the VisualGDB GUI (right-click on the project in Solution Explorer, select VisualGDB Project Properties). This will update IntelliSense accordingly.

    If you prefer using your own Makefiles, you can add extra IntelliSense directories via the IntelliSense Settings page of VisualGDB Project Properties.

    If you are new to VisualGDB, we would recommend trying v5.2 Beta 3 with the new MSBuild subsystem. It automatically synchronizes the build and IntelliSense settings and is generally more seamless than Make.

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