Configuring Visual Studio's Include Path

Discussion in 'C++' started by KevinSimonson, Oct 22, 2010.

  1. Is this the right use group for discussing Visual Studio 2010? If
    not, could someone point me to the right use group?

    I'm trying to use Visual Studio to build the source code for Shareaza,
    but every time I try to build it complains with a "fatal error C1083:
    Cannot open include file: 'boost/cstdint.hpp': No such file or
    directory". "cstdint.hpp" exists in directory "C:\Program Files\boost
    \boost_1_44\boost". A poster knowledgeable with Boost told me that I
    need "to configure the include path for the project to refer to that
    path," but he doesn't know how to do that with Visual Studio. Could
    someone on this use group tell me how to do that?

    Kevin S
    KevinSimonson, Oct 22, 2010
    #1
    1. Advertising

  2. On 10/22/2010 1:50 PM, KevinSimonson wrote:
    > Is this the right use group for discussing Visual Studio 2010? If
    > not, could someone point me to the right use group?
    > [..]


    'microsoft.public.vc.ide_general'. Also please do read the FAQ. You
    can find the FAQ list here: http://www.parashift.com/c -faq-lite/

    V
    --
    I do not respond to top-posted replies, please don't ask
    Victor Bazarov, Oct 22, 2010
    #2
    1. Advertising

  3. KevinSimonson

    Öö Tiib Guest

    On Oct 22, 8:50 pm, KevinSimonson <> wrote:
    > Is this the right use group for discussing Visual Studio 2010?  If
    > not, could someone point me to the right use group?
    >
    > I'm trying to use Visual Studio to build the source code for Shareaza,
    > but every time I try to build it complains with a "fatal error C1083:
    > Cannot open include file: 'boost/cstdint.hpp': No such file or
    > directory".  "cstdint.hpp" exists in directory "C:\Program Files\boost
    > \boost_1_44\boost".  A poster knowledgeable with Boost told me that I
    > need "to configure the include path for the project to refer to that
    > path," but he doesn't know how to do that with Visual Studio.  Could
    > someone on this use group tell me how to do that?


    Maybe try to Google "VC++ Directories"? Google usually can find MSDN
    pages about that MS IDE better and quicker than integrated help of
    that IDE.
    Öö Tiib, Oct 22, 2010
    #3
  4. KevinSimonson

    Richard Guest

    [Please do not mail me a copy of your followup]

    KevinSimonson <> spake the secret code
    <> thusly:

    >I'm trying to use Visual Studio to build the source code for Shareaza,
    >but every time I try to build it complains with a "fatal error C1083:
    >Cannot open include file: 'boost/cstdint.hpp': No such file or
    >directory". "cstdint.hpp" exists in directory "C:\Program Files\boost
    >\boost_1_44\boost". A poster knowledgeable with Boost told me that I
    >need "to configure the include path for the project to refer to that
    >path," but he doesn't know how to do that with Visual Studio. Could
    >someone on this use group tell me how to do that?


    You can manage include search order per-project or globally. For
    boost, I tend to prefer putting that globally. For libraries
    contained in the same solution, I use relative paths per-project that
    consume the library in the same solution. You tend to get boost
    separately and including it in the project settings just means that
    everyone else has to change the project settings because they don't
    have boost in the same place you have it.

    To set the include search order globally, go to Tools / Options /
    Projects and Solutions / VC++ Directories and pick Include Files on
    the combobox in the upper right.

    To set the include search order per-project, right-click on the
    project name in the solution explorer and select Properties. Then
    under C/C++ / General there is an entry for Additional Include
    Directories.
    --
    "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
    <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

    Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
    Richard, Oct 22, 2010
    #4
  5. KevinSimonson

    Geoff Guest

    On Fri, 22 Oct 2010 10:50:51 -0700 (PDT), KevinSimonson
    <> wrote:

    >Is this the right use group for discussing Visual Studio 2010? If
    >not, could someone point me to the right use group?
    >
    >I'm trying to use Visual Studio to build the source code for Shareaza,
    >but every time I try to build it complains with a "fatal error C1083:
    >Cannot open include file: 'boost/cstdint.hpp': No such file or
    >directory". "cstdint.hpp" exists in directory "C:\Program Files\boost
    >\boost_1_44\boost". A poster knowledgeable with Boost told me that I
    >need "to configure the include path for the project to refer to that
    >path," but he doesn't know how to do that with Visual Studio. Could
    >someone on this use group tell me how to do that?
    >
    >Kevin S


    This is a support question for the Shareaza team or the Boost team.
    The Boost documentation should say where their installer puts the
    necessary files. Shareaza should say where they expect the Boost
    headers to be.

    Your question is also a VC++ FAQ.

    VC++ allows per-project specification of third party libraries and
    headers, etc.

    Right-click the project name in Solution Explorer and click
    Properties. Then VC++ Directories is your dialog page.
    Geoff, Oct 22, 2010
    #5
  6. KevinSimonson

    Geoff Guest

    On Fri, 22 Oct 2010 20:13:23 +0000 (UTC),
    (Richard) wrote:

    >To set the include search order globally, go to Tools / Options /
    >Projects and Solutions / VC++ Directories and pick Include Files on
    >the combobox in the upper right.


    This depends on which version of VS you have. This option is no longer
    available in VS2010.
    Geoff, Oct 22, 2010
    #6
  7. * KevinSimonson, on 22.10.2010 19:50:
    > Is this the right use group for discussing Visual Studio 2010? If
    > not, could someone point me to the right use group?
    >
    > I'm trying to use Visual Studio to build the source code for Shareaza,
    > but every time I try to build it complains with a "fatal error C1083:
    > Cannot open include file: 'boost/cstdint.hpp': No such file or
    > directory". "cstdint.hpp" exists in directory "C:\Program Files\boost
    > \boost_1_44\boost". A poster knowledgeable with Boost told me that I
    > need "to configure the include path for the project to refer to that
    > path," but he doesn't know how to do that with Visual Studio. Could
    > someone on this use group tell me how to do that?


    It's a bit off-topic, but, of possible great interest to many.

    With Visual Studio 10.0 Microsoft made it hellishly difficult to change include
    paths globally, so you best bet within Visual Studio is to do it per project.

    For the global path (used by all projects), on my machine, Windows XP, it's
    stored in an XML file maintained by the MSBuild system,

    Directory "C:\Documents and Settings\Alf\Local Settings\Application
    Data\Microsoft\MSBuild\v4.0", filename "Microsoft.Cpp.Win32.user.props":

    <?xml version="1.0" encoding="utf-8"?>
    <Project ToolsVersion="4.0"
    xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
    <IncludePath>path to some include directory;$(IncludePath)</IncludePath>
    </PropertyGroup>
    </Project>


    An alternative is to build from the command line, possibly using a makefile if
    the project is large. The compiler itself is still reasonable. You can just set
    the INCLUDE environment variable. :)


    Cheers & hth.,

    - Alf

    --
    blog at <url: http://alfps.wordpress.com>
    Alf P. Steinbach /Usenet, Oct 23, 2010
    #7
  8. KevinSimonson

    Richard Guest

    [Please do not mail me a copy of your followup]

    Geoff <> spake the secret code
    <> thusly:

    >On Fri, 22 Oct 2010 20:13:23 +0000 (UTC),
    > (Richard) wrote:
    >
    >>To set the include search order globally, go to Tools / Options /
    >>Projects and Solutions / VC++ Directories and pick Include Files on
    >>the combobox in the upper right.

    >
    >This depends on which version of VS you have. This option is no longer
    >available in VS2010.


    So I see. However, it does direct you to the help section that tells
    you how to do the equivalent.
    --
    "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
    <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

    Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
    Richard, Oct 24, 2010
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. wh
    Replies:
    2
    Views:
    495
    Cowboy \(Gregory A. Beamer\)
    Jan 16, 2004
  2. Thirumalai
    Replies:
    0
    Views:
    631
    Thirumalai
    May 22, 2006
  3. rockdale
    Replies:
    1
    Views:
    588
    Juan T. Llibre
    Aug 23, 2006
  4. xman
    Replies:
    0
    Views:
    464
  5. Jaime Stuardo

    Prolem configuring Visual Studio .NET for remote debugging

    Jaime Stuardo, Jul 8, 2005, in forum: ASP .Net Security
    Replies:
    0
    Views:
    129
    Jaime Stuardo
    Jul 8, 2005
Loading...

Share This Page