Additional Include and Library directories
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Additional Include and Library directories

  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,258

    Additional Include and Library directories

    For each project in a VS solution it's possible to stipulate per-project folders that get searched in addition to the folders that you've set globally for Visual Studio.

    Which folders take priority? Do the project's folders get searched first? Or do the global folder get searched first? Or is it possible to select one set as having priority over the other?

    (this is VS 2005 BTW)
    "A problem well stated is a problem half solved. - Charles F. Kettering

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,039

    Re: Additional Include and Library directories

    Best regards,
    Igor

  3. #3
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,258

    Re: Additional Include and Library directories

    Thanks Igor but that link only explains 3/4 of the problem

    AFAICT there are 4 locations where the compiler (or linker) searches in:-

    1) The same directory as the source file.
    2) Any folders saved in the project's settings (or more correctly, in the current target's settings).
    3) Any folders stipulated in the INCLUDE (or LIBPATH) environment var.
    4) Any of Visual Studio's 'global' folders (Tools->Options->Projects and Solutions->VC++ Directories).

    After reading that article I understand the ordering between the first three - but I still don't know where item 4 fits into the equation. It's not vitally important... I'm just curious.
    "A problem well stated is a problem half solved. - Charles F. Kettering

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,196

    Re: Additional Include and Library directories

    Seems like something you could figure out. Create a header file that compiles and one that doesn't. By moving them around to different directories and seeing which one the compiler chooses, you should be able to get an idea of the order it's looking in the directories.

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,039

    Re: Additional Include and Library directories

    Quote Originally Posted by John E View Post
    4) Any of Visual Studio's 'global' folders (Tools->Options->Projects and Solutions->VC++ Directories).

    After reading that article I understand the ordering between the first three - but I still don't know where item 4 fits into the equation. It's not vitally important... I'm just curious.
    Seems like DEVENV uses its own environment, _ACP_INCLUDE, that stands for classical INCLUDE, and exactly contains the VC++ Directories list.
    Best regards,
    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center