Configuring Visual Studio's Include Path

K

KevinSimonson

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
 
Ö

Öö Tiib

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.
 
R

Richard

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

KevinSimonson <[email protected]> spake the secret code
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.
 
G

Geoff

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.
 
G

Geoff

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.
 
A

Alf P. Steinbach /Usenet

* 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
 
R

Richard

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

Geoff <[email protected]> spake the secret code
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top