I am trying to install few libraries that are required for cmake to build a project.
For successful build, cmake requires libuv and uWebSockets libraries to be installed:
https://github.com/uNetworking/uWebSockets
I'm using MinGW gcc compiler (C:\msys64\mingw64) along with cmake.
However, during configuration cmake fails with the following errors:
[cmake] Not searching for unused variables given on the command line.
[cmake] CMake Error at examples/example1/CMakeLists.txt:14 (find_library):
[cmake] Could not find UV_LIB using the following names: uv
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
Now, I have downloaded the tar-balls from the above GitHub repo, but I am unable to understand where and how this is to be installed.
Related
I was using vcpkg in classic mode. Then I found about vcpkg manifests, I placed a vcpkg.json file on my project folder and fired cmake. And the following happened:
-- Building for: Visual Studio 16 2019
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.29.1.windows.1")
-- Bootstrapping vcpkg before install
-- Bootstrapping vcpkg before install - failed
CMake Error at C:/Users/user/project/src/vcpkg/scripts/buildsystems/vcpkg.cmake:850 (message):
vcpkg install failed. See logs for more information:
C:\Users\user\project\src\mylib\x64\vcpkg-bootstrap.log
Call Stack (most recent call first):
C:/Qt/Tools/CMake_64/share/cmake-3.21/Modules/CMakeDetermineSystem.cmake:121 (include)
CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred!
Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: ALL_BUILD.vcxproj
C:\Users\user\project\src\mylib
done
It tells me to check vcpkg-bootstrap.log but it is empty.
So, am I messing with something or it's not really supported to use vcpkg in manifest mode after it has been used in classic mode?
Or, in other words, do I need a fresh vcpkg git clone to use manifests?
I am newbie in using C++ and I have hard times to compile the io2d with CMake. I am currently using Windows, and I have used vcpkg to download the io2d packages, cairo packages and graphicsmagick packages. Everything are downloaded by both x64 and x86 windows.
The way I follow through on the installation work is from the Buildings Steps in Cairo/Win32 on Windows:
https://github.com/cpp-io2d/P0267_RefImpl/blob/master/BUILDING.md
However, when I build with cmake -G "Visual Studio 16 2019" --config Debug "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_TOOLCHAIN_FILE=c:/source/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" ..\. , it appears the following error. And I have looked for online but seems cannot find a solution with windows system.
Happy to get any opinions and help on this issue.
PS C:\Users\samue\OneDrive\桌面\Udacity\CppND-Route-Planning-Project\P0267_RefImpl\Debug> cmake -G "Visual Studio 16 2019" --config Debug "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_TOOLCHAIN_FILE=c:/source/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DVCPKG_TARGET_TRIPLET=x64-windows" ..\.
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
Default IO2D backend was not specified, choosing automatically...
Found Windows, using CAIRO_WIN32.
CMake Error at C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find Cairo (missing: CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:577 (_FPHSA_FAILURE_MESSAGE)
cmake/FindCairo.cmake:102 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt:5 (find_package)
-- Configuring incomplete, errors occurred!
I have tried another way to compile, but also does not work which yield to another problem. The location of my entire project folder is in the following address: C:\Users\samue\OneDrive\桌面\Udacity\CppND-Route-Planning-Project.
When I tried to build the project, firstly I cd to the address above.
Then use mkdir build and cd build
Then run cmake ..
But, it appears the error code in finding the io2d configuration files. I have no idea how to let CMake to find the required files. The error is located as belows:
PS C:\Users\samue\OneDrive\桌面\Udacity\CppND-Route-Planning-Project\build> cmake ..
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
CMake Error at C:/source/vcpkg/scripts/buildsystems/vcpkg.cmake:622 (_find_package):
By not providing "Findio2d.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "io2d", but
CMake did not find one.
Could not find a package configuration file provided by "io2d" with any of
the following names:
io2dConfig.cmake
io2d-config.cmake
Add the installation prefix of "io2d" to CMAKE_PREFIX_PATH or set
"io2d_DIR" to a directory containing one of the above files. If "io2d"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:15 (find_package)
-- Configuring incomplete, errors occurred!
I have a problem when executing the following command:
cmake -G "Visual Studio 15 2017 Win64" ..
The error:
CMake Error at CMakeLists.txt:155 (find_package):
By not providing "FindCEF.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "CEF", but
CMake did not find one.
Could not find a package configuration file provided by "CEF" with any of
the following names:
CEFConfig.cmake
cef-config.cmake
Add the installation prefix of "CEF" to CMAKE_PREFIX_PATH or set "CEF_DIR"
to a directory containing one of the above files. If "CEF" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
I am trying build grpc CPP from the source using CMake as described in github for Windows but it is keep on failing with following error:
E:\gok\IEC61850\grpc\New folder\grpc>md .build
E:\gok\IEC61850\grpc\New folder\grpc>cd .build
E:\gok\IEC61850\grpc\New folder\grpc\.build>cmake .. -G "Visual Studio 14 2015"
CMake Error at CMakeLists.txt:31 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
See also "E:/gok/IEC61850/grpc/New folder/grpc/.build/CMakeFiles/CMakeOutput.log
Like many others i have problems using boost libraries with windows. On Ubuntu 16.04 it works all very well with libboost-all-dev but on windows i have many problems.
I try to build a cryptonote application which i can compile completely without any errors under linux. But i need also windows binaries so i did the steps to install the following tools:
Visual Studio 2013 (vc120)
CMake 3.10.1
Python 3.6.4
Boost 1.58
For boost i did the following steps:
Installing boost from binary
Run bootstrap.bat
Run b2 install
Run bjam install "--with-some-libs"
Nothing works. The cryptonote throws me an error that some but not all libraries could not be found.
I tried to set the BOOST_ROOT, BOOST_LIBRARY_DIRS, BOOST_INCLUDE_DIRS -> Nothing.
What i did wrong? The error i get from cmake is this:
-- Building for: Visual Studio 12 2013
-- The C compiler identification is MSVC 18.0.31101.0
-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.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 12.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 12.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
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
CMake Error at C:/Program Files/CMake/share/cmake-3.10/Modules/FindBoost.cmake:1928 (message):
Unable to find the requested Boost libraries.
Boost version: 1.58.0
Boost include path: C:/local/boost_1_58_0
Could not find the following static Boost libraries:
boost_system
boost_filesystem
boost_thread
boost_date_time
boost_chrono
boost_regex
boost_serialization
boost_program_options
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:113 (find_package)
-- WARNING: Git was not found!
-- Found PythonInterp: C:/Users/chris/AppData/Local/Programs/Python/Python36-32/python.exe (found version "3.6.4")
CMake Warning in CMakeLists.txt:
CMAKE_SKIP_INSTALL_RULES was enabled even though installation rules have
been specified
-- Configuring incomplete, errors occurred!
See also "C:/Users/chris/Documents/GitHub/cryptonote/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/chris/Documents/GitHub/cryptonote/build/CMakeFiles/CMakeError.log".
Maybe someone can help to fix this issue ?
Greetings
Ok finally i've found a solution after reading many, many and many more pages on the internet.
The solution is really simple. After downloading the boost package and installing it (or building from source) you just need the following two parts:
Open your CMD (cmd.exe)
switch to your installation directory of boost (example C:\local\boost_1_58_0)
Just run the following commands:
bootstrap.bat
b2 link=static runtime-link=static release stage
This will create all librarys static and makes it useable for cmake.
This solution works for me and made me able to build the needed package.
Thanks for all helpers
Or you could just tell boost which compiler to use by adding
toolset=msvc-12.0
(for MS 2013 v12, etc.)
to the b2 command line :-)