Finding the include library

Pages: 12
I'm not sure if I'm a little confused. My boost files are in c:\boost_1_49_0\boost_1_49_0.
My confusion comes because in line #4 for the location you suggests that I just type c:\ and then click ok. Should I just type c:\ , or should I type c:\boost_1_49_0 , or c:\boost_1_49_0\boost_1_49_0?

Also, in line #7's value field type c:\boost_1_49_0 , or c:\boost_1_49_0\boost_1_49_0?

In line #8's * respecting the semicolon! *. . . I'm not sure what that means. Does it mean to end the line with a semicolon?
Sorry for being such a stupid newbie. As always I really appreciate all your help!!! . . . . therry

1
2
3
4
5
6
7
8
9
10
11
12
13
1. open up visual studio and create new project.
2. click on view > property manager
3 right click on your project name and click add new project prperty sheet
4. in add new item dialog type Boost.props into name field, into location type C:\ and click OK
5. double click on newly created project property sheet to open it
6. goto user macros and click on add macro
7. into name field type BOOST, and into value field type c:\boost_1_49_0 check the box "set this macro in enviroinment
 variable" and click OK
8. VC++ directories > include directories and append $(BOOST) respecting the semicolon!
9. Linker > general > aditional library directories and append $(BOOST)\stage\lib
10. Linker > general > link library dependencies set to YES
11. Finaly click apply and close project property sheet
12. In project proerty manager right click on your new sheet and click save

My confusion comes because in line #4 for the location you suggests that I just type c:\ and then click ok. Should I just type c:\ , or should I type c:\boost_1_49_0 , or c:\boost_1_49_0\boost_1_49_0?


The abowe steps you posted are to create Boost.props property sheet.

So yes, all you all you have to type into Location field is C:\

Also, in line #7's value field type c:\boost_1_49_0 , or c:\boost_1_49_0\boost_1_49_0?


Here in your case you have to type c:\boost_1_49_0\boost_1_49_0

In line #8's * respecting the semicolon! *. . . I'm not sure what that means.


That means you have to separete include paths with semicolon.
For example:
$(VCInstallDir)bin\x86_amd64;$(VCInstallDir)bin;$(WindowsSDK_ExecutablePath_x86);$(VSInstallDir)Common7\Tools\bin;$(BOOST)\include

do you see the semicolons between path names?
Last edited on
One final question. All of the entries in the include directories end with *\include* . . . . should I also append that to $(BOOST); to match all the others?
yes of course, I already told you that in my directions before :)

VC++ directories > include directories and append $(BOOST)\include

That is the only entry you have to put into VC++ directories > include directories

Why don't you read notes that has already been told?
Sorry to be such a pest, but with all this work, my problem still exist. I still don't know what my include statement should be for the boost library.
I have not yet dealt with the cURL aspect just yet, because I can't get the include statement to be recognized/opened. The program that I'm using is:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 /* 
     * This is a very simple example of how to use libcurl from within 
     * a C++  program. The basic idea is that you want to retrieve the 
     * contents of a web page as a string. Obviously, you can replace 
     * the buffer object with anything you want and adjust elsewhere 
     * accordingly. 
     * 
     * Hope you find it useful.. 
     * 
     * Todd Papaioannou 
     */  
      
  
	#include <string>  
	#include <iostream>  
	#include <$(BOOST)\include>

        #include "curl/curl.h" 
        
        using namespace std;  


When I try to build I get the following error:

1
2
3
4
5
6
7
8
1
1>Build started 5/8/2012 8:46:38 PM.
1>InitializeBuildStatus:
1>  Touching "Debug\DownLoadFromWeb.unsuccessfulbuild".
1>ClCompile:
1>  DownLoadFromWeb.cpp
1>line (17): fatal error C1083: Cannot open include file: '$(BOOST)\include': No such file or directory
1>
1>Build FAILED.


I know all the cURL stuff will not work because I have not installed the cURL requirements just yet. I'm still dealing with the boost include statement. If you can, please advise. . . . thanks . . . therry
thery, thery, thery,
I just hope you're not plaing some kind of silly game with me :D
This topic takes too long, and still problem isn't solved.

It looks there is no way to make this work using methods described so far, so I decided to create an fully working Visual studio solution with project and property sheets for you.

I uploaded them on the internet so you can download it and use it.
http://uploading.com/files/49a89683/Boost.rar/

Once you extract downloaded Boost.rar, inside the extracted file you'll find a visual studio solution, a project and 4 different property sheets.
(I'm not sure if you'll be able to open that solution since I create it in visual studio 11)

Anyway you can use the property sheets located inside the folder in any project you crate in your visual studio edition.

I included a path which corespond to your boost path wich is as you told me c:\boost_1_49_0\boost_1_49_0

So you don't have edit anything here.

Please note, inside the extracted boost\boost folder You will find Boost.cpp file.

That is a source file which will show you how to properly include an boost header, it will also show you how to create a boost thread.

When you compile that source an run it in your project it will display you an informational message that your boost library now fully works.

Property sheets included as allready told are of 4 different kidns and their names are self explanatory, here thy are:

Boost.Debug.Dynamic.props is used to build boost in debug mode dynamicaly
Boost.Debug.Static.props is used to build boost in debug mode staticaly

Other two are the same but you will use them to build released projects.
Boost.Release.Dynamic.props
Boost.Release.Static.props


I'm pretty sure you can't miss the door at this point since you now have everything you need :D
You are correct, I cannot open the solutions, however, I did open the Property sheets using notepad. Inspecting your examples, I discovered some differences between what I have and what you have. As an *#include* statement you have:
#include <boost\thread\thread.hpp> I tried to replace this statement in my code and got:
1
2
3
4
5
6
7
8
9
10
11
12

1>InitializeBuildStatus:
1>  Touching "Debug\DownLoadFromWeb.unsuccessfulbuild".
1>ClCompile:
1>  DownLoadFromWeb.cpp
1> fatal error C1083: Cannot open include file: 'boost\thread\thread.hpp': No
such file or directory
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.53
 Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped 

Also in all your Property sheets you have:
1
2
3
  <ExecutablePath>$(BOOST)\bin;$(ExecutablePath)</ExecutablePath>
  <IncludePath>$(BOOST)\include;$(IncludePath)</IncludePath>
  <LibraryPath>$(BOOST)\lib\stage;$(LibraryPath)</LibraryPath>


I do not have: $(ExecutablePath), or $(IncludePath), or $(LibraryPath) in any of my property sheets. Should I add them?

Topic archived. No new replies allowed.
Pages: 12