Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update instruction for compilate boost libraries #6531

Merged
merged 1 commit into from
Feb 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions projectfiles/CodeBlocks/libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,27 @@ Download and unpack the source of the libraries zlib, libbzip2, boost (version 1
- **Boost** http://www.boost.org/users/download/
- **Zlib** http://www.zlib.net/

Open `cmd`, go to the Boost directory and type (with the correct paths of the other two libraries):
Open `cmd`, go to the Boost directory and open bootstrap.sh (with the correct paths of the other two libraries):

Then run this command:
```
bootstrap gcc
.\b2 -sZLIB_SOURCE=..\zlib-1.2.11 -sBZIP2_SOURCE=..\bzip2-1.0.8 -j2 --with-coroutine --with-date_time --with-filesystem --with-iostreams --with-locale --with-program_options --with-random --with-regex --with-system --with-thread --with-test --with-timer --toolset=gcc --layout=system variant=release address-model=64
```
Then run this command:
and
```
.\b2 -sZLIB_SOURCE=..\zlib-1.2.11 -sBZIP2_SOURCE=..\bzip2-1.0.6 -j2 --with-coroutine --with-date_time --with-filesystem --with-iostreams --with-locale --with-program_options --with-random --with-regex --with-system --with-thread --with-test --with-timer --toolset=gcc --layout=system variant=release address-model=64
.\b2 -sZLIB_SOURCE=..\zlib-1.2.11 -sBZIP2_SOURCE=..\bzip2-1.0.8 -j2 --with-test --toolset=gcc --layout=system link=shared variant=release address-model=64
```
Depending on your boost version, you may need to replace `..\` with the absolute paths to zlib and bzip.
If you have multiple versions of gcc, add `--toolset=gcc-X.Y.Z` with **X.Y.Z** being the target version number.

Separate the required subset of the Boost source:
Run this command for generate `bcp.exe`
```
.\b2 tools\bcp
.\b2 tools\bcp --toolset=gcc
```
Create `include` in same path what `boost_...` and run this command:
```
dist\bin\bcp.exe algorithm asio assign bimap coroutine container date_time dynamic_bitset exception filesystem iostreams iterator locale math mpl multi_array multi_index program_options ptr_container random range regex serialization system spirit test boost\nondet_random.hpp boost\fusion\include\define_struct.hpp ..\include
dist\bin\bcp.exe algorithm asio assign bimap coroutine container date_time dynamic_bitset exception filesystem iostreams iterator locale math mpl multi_array multi_index program_options ptr_container random range regex serialization system spirit test boost\nondet_random.hpp boost\fusion\include\define_struct.hpp boost\scope_exit.hpp boost/typeof/incr_registration_group.hpp ..\include
```

Replace the outdated files in 'cb/lib' with those from 'boost_.../stage/lib' and those in 'cb/include/boost' with the ones in 'boost_.../boost'.