tgbot-cpp icon indicating copy to clipboard operation
tgbot-cpp copied to clipboard

problem build on windows

Open vega0 opened this issue 3 years ago • 4 comments

Happens it .

PS G:\Workspace\cpp.machinarium.gui\Стороннее\tgbot-cpp> cmake .\CMakeLists.txt
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
CMake Warning at C:/Program Files/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1384 (message):
  New Boost version may have incorrect or missing dependencies and imported
  targets
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.24/Modules/FindBoost.cmake:1507 (_Boost_COMPONENT_DEPENDENCIES)
  C:/Program Files/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2118 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:65 (find_package)


CMake Error at C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: system) (found suitable version "1.81.0",
  minimum required is "1.59.0")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.24/Modules/FindBoost.cmake:2376 (find_package_handle_standard_args)
  CMakeLists.txt:65 (find_package)


-- Configuring incomplete, errors occurred!
See also "G:/Workspace/cpp.machinarium.gui/Стороннее/tgbot-cpp/CMakeFiles/CMakeOutput.log".
See also "G:/Workspace/cpp.machinarium.gui/Стороннее/tgbot-cpp/CMakeFiles/CMakeError.log".

image

all libraries are builden.

vega0 avatar Sep 30 '22 06:09 vega0

How did you install boost? Did you download it from boost.org or via vcpkg?

llnulldisk avatar Sep 30 '22 07:09 llnulldisk

How did you install boost? Did you download it from boost.org or via vcpkg?

git clone & static build

vega0 avatar Oct 04 '22 15:10 vega0

It seems like cmake can't find the static build of boost

Can you try this:

  1. Go to the directory of boost
  2. Run bootstrap.bat
  3. Run b2 install --prefix=PREFIX where PREFIX is the directory where you want Boost to be installed
  4. Add PREFIX\bin to your PATH environment variable.

llnulldisk avatar Oct 04 '22 18:10 llnulldisk

It seems like cmake can't find the static build of boost

Can you try this:

  1. Go to the directory of boost
  2. Run bootstrap.bat
  3. Run b2 install --prefix=PREFIX where PREFIX is the directory where you want Boost to be installed
  4. Add PREFIX\bin to your PATH environment variable.

Yes, adding it to the path is helped me. (almost)

vega0 avatar Oct 06 '22 20:10 vega0