Help getting Boost included in my C++ program

  • Context: C/C++ 
  • Thread starter Thread starter Jamin2112
  • Start date Start date
  • Tags Tags
    Boost C++ Program
Click For Summary

Discussion Overview

The discussion revolves around troubleshooting the inclusion of the Boost library, specifically the Filesystem component, in a C++ program. Participants are sharing their experiences and suggestions related to library paths, build settings, and version compatibility.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant describes changing the Library Search Path and trying various include directives for the filesystem.hpp file without success.
  • Another participant provides a guideline for downloading and setting up Boost, including checking version compatibility and configuring build settings in XCode.
  • A later reply questions whether the version variable in the setup script should be modified to match the desired Boost version.
  • Another participant suggests that the issue may stem from the need for a separate build for the Filesystem library.

Areas of Agreement / Disagreement

Participants express uncertainty regarding the correct setup and configuration for including Boost, with multiple suggestions and approaches presented without clear consensus on the best solution.

Contextual Notes

There are unresolved questions about the specific modifications needed for the setup script and the implications of version compatibility for the Boost library.

Jamin2112
Messages
973
Reaction score
12
I've changed the Library Search Path to the folder that contains the file I'm trying to use, filesystem.hpp, and then including the file with the directive #include <filesystem.hpp>. I've also tried changing it to "filesystem.hpp"; changing the search to recursive; trying to grab it from the folder 1 level above in the directory by changing the search path 1 level above and changing the directive to #include <boost/filestysem.hpp>, #include "boost/filestysem.hpp", etc.

Hopefully the following screenshots can show you where I'm at.

b56GX.png


24o9kqh.jpg
Any suggestions about what I can try to fix this?
 
  • Like
Likes   Reactions: Silicon Waffle
Technology news on Phys.org
Here is an "imaginary" guideline :DD. Use this with your own risk.

1. Download Boost and extract it into your favorite folder.
2. Check the xxxboostxxx.sh file to see if its version to be installed matches with one you would want to build.
3. Run it ./xxxboostxxx.sh, after which the BOOST environment variable will be created.
4. Create your build settings in XCode (you can use the attachments below then fix the versions of gcc/g++ compiler and boost).
OTHER_LDFLAGS = $(BOOST)/lib/libboost_system-xgcc48-mt-$(BOOST_VERSION)-macosx.a
HEADER_SEARCH_PATHS = $(inherited) $(BOOST)/include/boost-$(BOOST_VERSION)/
LIBRARY_SEARCH_PATHS = $(inherited) $(BOOST)/lib
BOOST_VERSION = 1_57
 

Attachments

Silicon Waffle said:
Here is an "imaginary" guideline :DD. Use this with your own risk.

1. Download Boost and extract it into your favorite folder.

Done.

2. Check the xxxboostxxx.sh file to see if its version to be installed matches with one you would want to build.

It doesn't. Should I change the VERSION variable accordingly?

3. Run it ./xxxboostxxx.sh, after which the BOOST environment variable will be created.

Am I supposed to use a modified version of that script and is supposed to be self-explanatory which portions I need to modify for my own use?
 
I may have detected my problem. I'm trying to use the Filesystem library and it says here that Filesystem requires a separate build.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 27 ·
Replies
27
Views
6K
Replies
14
Views
4K
Replies
19
Views
3K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 10 ·
Replies
10
Views
6K
  • · Replies 15 ·
Replies
15
Views
8K
Replies
5
Views
2K