Giter Site home page Giter Site logo

Comments (3)

e-fominov avatar e-fominov commented on May 3, 2024

I have tested several ways of solution and found one possible way: do not use "stage" folder for building boos libs

  1. Build boost:
b2 address-model=64 --build-type=minimal stage --stagedir=stage64
b2 address-model=32 --build-type=minimal stage --stagedir=stage32

Its important to keep x86 libraries in "stage32" not "stage" folder
2. Put additional flags to Cmake when building Beast:

cmake .. -G"Visual Studio 14 2015" -DBOOST_ROOT=d:\lib\boost_1_61_0 -DBOOST_LIBRARYDIR=d:\libs\boost_1_61_0\stage32\lib
cmake .. -G"Visual Studio 14 2015 Win64" -DBOOST_ROOT=d:\lib\boost_1_61_0 -DBOOST_LIBRARYDIR=d:\libs\boost_1_61_0\stage64\lib

Now it correctly finds boost and creates correct vsproj files

If machine has only one boost and its installed in default folder - no need in additional flags when running cmake. This solution only when you have two boosts

To check if it finds boost correctly you can try temptorary modifying cmakelists.txt file:

    set(Boost_USE_STATIC_LIBS ON)
    set(Boost_USE_MULTITHREADED ON)
    find_package(Boost REQUIRED COMPONENTS coroutine context thread filesystem program_options system)
    message(${Boost_LIBRARY_DIRS})

add this before "if(MSVC)" and it will print found library path

After boost will be found correctly we need modify CMakeLists.txt to add boost libraries to linker (now it does not have them)

from beast.

e-fominov avatar e-fominov commented on May 3, 2024

and one more way to solve this:

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
    set(Boost_LIBRARY_DIR ${BOOST_ROOT}/stage64/lib)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
    set(Boost_LIBRARY_DIR ${BOOST_ROOT}/stage/lib)
endif()

this code should be called befor find_package(boost) and will initialize library dir automatically based on MSVC version, but require to have BOOST_ROOT set, that can be got from Environment

from beast.

vinniefalco avatar vinniefalco commented on May 3, 2024

Beast 1.0.0-b32 now supports finding Boost packages on Windows!

from beast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.