Project

General

Profile

Win10 issues with examples : CMake and Boost library

Added by Paul Leopard almost 7 years ago

Trying to get the examples compiled so I can start doing some real work with Wt ... This library looks very nice so I am encouraged ...

Anyway, I'm having Boost issues trying to configure Visual Studio 14 Win64 projects with the examples. Following is a list of what I've got and done so far:

- Installed boost 167 from the precompiled binaries to C:\local\boost_1_67_0\

- Set BOOST_ROOT environment variable to the same directory

- Installed Wt 403 from the prebuilt binaries to C:\Users\pleopard\Wt 4.0.3 msvs2015 x64

- Set the Wt_DIR environment variable to C:\Users\pleopard\Wt 4.0.3 msvs2015 x64\lib\cmake\wt

- Opened a command console to the examples directory (configured with the VS 14 Win64 vcvarsall.bat)

  • Create and configure a build directory :
    mkdir build
    cd build
    cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../
    I get the following output (Note: CMakeOutput.log and CMakeError.log attached to this message)

*Anybody have any ideas?

Thanks,

Paul

Output:*

_C:\Users\pleopard\Wt 4.0.3 msvs2015 x64\lib\Wt\examples>cd build

C:\Users\pleopard\Wt 4.0.3 msvs2015 x64\lib\Wt\examples\build>cmake ../ -DCMAKE_INSTALL_PREFIX=../ -DCMAKE_BUILD_TYPE=Release

--- Building for: Visual Studio 14 2015

--- Selecting Windows SDK version 10.0.14393.0 to target Windows 10.0.16299.

--- The C compiler identification is MSVC 19.0.24215.1

--- The CXX compiler identification is MSVC 19.0.24215.1

--- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe

--- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe --- works

--- Detecting C compiler ABI info

--- Detecting C compiler ABI info - done

--- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe

--- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe --- works

--- Detecting CXX compiler ABI info

--- Detecting CXX compiler ABI info - done

--- Detecting CXX compile features

--- Detecting CXX compile features - done

--- Boost version: 1.67.0

CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (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.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)

C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)

C:/Users/pleopard/Wt 4.0.3 msvs2015 x64/lib/cmake/wt/wt-config.cmake:5 (find_package)

CMakeLists.txt:43 (find_package)

CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (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.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)

C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)

C:/Users/pleopard/Wt 4.0.3 msvs2015 x64/lib/cmake/wt/wt-config.cmake:5 (find_package)

CMakeLists.txt:43 (find_package)

CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (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.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)

C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)

C:/Users/pleopard/Wt 4.0.3 msvs2015 x64/lib/cmake/wt/wt-config.cmake:5 (find_package)

CMakeLists.txt:43 (find_package)

CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (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.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)

C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)

C:/Users/pleopard/Wt 4.0.3 msvs2015 x64/lib/cmake/wt/wt-config.cmake:5 (find_package)

CMakeLists.txt:43 (find_package)

CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (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.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)

C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)

C:/Users/pleopard/Wt 4.0.3 msvs2015 x64/lib/cmake/wt/wt-config.cmake:5 (find_package)

CMakeLists.txt:43 (find_package)

CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (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.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)

C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)

C:/Users/pleopard/Wt 4.0.3 msvs2015 x64/lib/cmake/wt/wt-config.cmake:5 (find_package)

CMakeLists.txt:43 (find_package)

CMake Warning at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:801 (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.10/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)

C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)

C:/Users/pleopard/Wt 4.0.3 msvs2015 x64/lib/cmake/wt/wt-config.cmake:5 (find_package)

CMakeLists.txt:43 (find_package)

--- Not building blog example: requires boost headers.

--- Not building charts example: requires boost headers.

--- Not building chart3D example: requires boost headers.

--- Not building composer example: requires boost headers.

--- Not building locale example: requires boost headers.

--- Not building oidc example: requires boost headers.

--- Not building template-fun example: requires boost headers.

--- Not building filetreetable example: requires boost_filesystem library.

--- Not building gitmodel example: uses POSIX calls not available on win32

CMake Error at hangman/CMakeLists.txt:17 (CHECK_FUNCTION_EXISTS):

Unknown CMake command "CHECK_FUNCTION_EXISTS".

--- Configuring incomplete, errors occurred!

See also "C:/Users/pleopard/Wt 4.0.3 msvs2015 x64/lib/Wt/examples/build/CMakeFiles/CMakeOutput.log".

See also "C:/Users/pleopard/Wt 4.0.3 msvs2015 x64/lib/Wt/examples/build/CMakeFiles/CMakeError.log".

CMakeOutput.log (24.8 KB) CMakeOutput.log CMakeOutput.log
CMakeError.log (2.91 KB) CMakeError.log CMakeError.log

Replies (3)

RE: Win10 issues with examples : CMake and Boost library - Added by Roel Standaert almost 7 years ago

It's not finding Boost properly because your CMake is too old. Update it to CMake 3.11.

As for the error about CHECK_FUNCTION_EXISTS: it looks like we need to add INCLUDE(CheckFunctionExists) to examples/hangman/CMakeLists.txt.

RE: Win10 issues with examples : CMake and Boost library - Added by Paul Leopard almost 7 years ago

That fixed everything, I am up and running now.

I would never have expected that a simple change from CMake 3.10 to 3.11 would make all the difference.

Thanks for your help

Paul

RE: Win10 issues with examples : CMake and Boost library - Added by Wim Dumon almost 7 years ago

Hi Paul,

Good to hear everything works.

Finding boost on Windows can be a challenge, and the 'system' regularly changes.

Best regards,

Wim.

    (1-3/3)