Windows CMake GUI cannot find Boost library - c++

This is my first time using cmake gui in windows. I am trying to install the vsomeip library in Windows. This is mainly required for my common API someip application. Now, I am having issue to compile the vsomeip library. When I run CMake gui, it says Could NOT find Boost (missing: system thread filesystem) (found suitable version "1.67.0", minimum required is "1.55")
I have already added the boost directory to my environment Path variable. I am not sure whether are there any additional configurations is required. When I try the same in Linux, it works fine. Only in Windows there is an issue.

I fixed the issue by changing the boost version inside the boost/version.hpp.
Previously the version was written as 1_55_0. So I just changed the version to 1_55.
The other fixed was to add the environment variable Path. I added the boost include directory itself: C:\local\boost_1_55_0\boost
I am not sure this is the right way for the fix but this fixes worked for me. Maybe if you guys have better solution can share it here.

Related

CMake cache windows

When using CMake on unix I dont have any issues. I can use CLion to do a cmake setup, cmake build and cmake install, open a different project and it will find the previously built library when using find_package. On windows this does not seem to be possible. By default it tries to install the build code into strange directories (like C:\Program Files). I have added a CMAKE_INSTALL_PREFIX to both my library CMakeLists.txt and the appliation CMakeLists.txt, however when using find_package(SDL2)CMake still complains there is no config file for CMake and SDL2. When checking the following file exists:
U:\various\cmake-cache\Program Files (x86)\SDL2\cmake\SDL2Config.cmake
The directory U:\various\cmake-cache was used as CMAKE_INSTALL_PREFIX for both SDL2 and my application. Yet it still refuses to compile.
What can I do to make CMake at least somewhat useful on windows? On Unix things work great, but it feels like a huge PITA on Windows so far... It seems like all the concepts dont work there. I would really like to have one central location that is used by every CMake build on my system and everything is installed there and when another project uses a library it is searched there. Is this possible?

How to correctly solve boost dependency issues

I am using cpprestsdk/casablanca in my project. cpprestsdk is dependent on Boost library. Several weeks ago I downloaded cpprest's source and built *.so library with Boost 1.65.1 and some version of OpenSSL. My system is Arch Linux.
Due to a recent events with Meltdown and Spectre exploits, I've made a full system upgrade (kernel 4.14, latest versions of libraries) and now I have Boost 1.66.0 and a more recent version of OpenSSL.
When I try to compile my project, linker states that
libboost_[random, system, etc. - there are many of them].so.1.65.1, needed by /usr/local/lib/libcpprest.so, not found (try using -rpath or -rpath-link)
It also shows warning about SSL because latest version of cpprestsdk is incompatible with OpenSSL 1.1+ so you have to build it (cpprest) with the previous.
libcrypto.so.1.0.0, needed by /usr/local/lib/libcpprest.so, may conflict with libcrypto.so.1.1.
Obviously, there is no boost 1.65.1 installation on my system, so there is no point in using -rpath.
I figured that I should build another version of boost, but several sources claim that it is bad idea to store multiple versions of boost on one system. I am not sure how to correctly store custom boost version either.
I can rebuild libccprest with the current library but it'll only work till the next update.
I guess that in order to completely build my project, I should embed specific versions of Boost, SSL and other dependencies into my project.
What are general solutions for such a problem? How do you manage and deploy custom (non-system-side) versions of shared libraries? Every "big" library has it's own installation system/scripts so I have no idea how to integrate it to my own project's build system. I've never encounter issues with libraries before so I am not sure what path to choose. I am using Makefile to build my project.

Cmake unable to locate Boost Libraries (Windows)

I'm currently trying to build the Apache qpid messaging broker on Windows using CMake and the Boost (C++). I went through the initial steps of setting up Qpid on Windows as specified in this file. I set the variable BOOST_ROOT to "C:/< Home >/Downloads/boost_1_61_0" initially so that CMake could find the Boost Libraries (e.g. random, math, chrono, etc.) but I got this log saying that it could only find some of the libraries, but not others. I thought that maybe the filepath needed to include the directory where the Boost libraries were actually located (i.e. C:/< Home >/Downloads/boost_1_61_0/boost) but I was unable to reset the BOOST_ROOT environment variable despite deleting it and creating another one.
I was advised on this forum to delete the cache file for CMake using the GUI so I could reset the variable, but that didn't seem to work either.
Am I using the correct file path for BOOST_ROOT? If not, how should I go about changing it?
Some of the Boost libraries (e.g. chrono) need to be compiled first. If you have only downloaded Boost library from the website, you probably have not built these libraries. Check Boost website for instructions how to build on Windows. The site also lists which libraries need to be built. Alternatively, you can search for sites where pre-built Boost libraries are hosted. You can download and install from there.

OpenTissue boost bindings issue

I want to install OpenTissue physics simulation library, and it requires boost.
There is a .bat file in the third_party/include directory which retrieves the required boost bindings. I've successfully ran the script and after that CMake.
However, the CMake 'Configure' states: "Could NOT find boost", even though it is in the directory where the authors of the script supposed it would be. After that, I've tried to manually set the BOOST_BINDING_PATH, as stated here: http://www.opentissue.org/mediawiki/index.php/Boost_bindings. But still, I cannot get the CMake to register the boost bindings.
Has anyone done this successfully?
OS: Windows 8.1
OpenTissue retrieved from: http://www.opentissue.org/svn/OpenTissue/sandbox
CMake: 2.8.12.2
If you know where Boost is, you could pass BOOST_INCLUDE_DIR and BOOST_LIBRARY_DIR when you run CMake, like so:
cmake -DBOOST_INCLUDE_DIR='path_to_boost_headers' -DBOOST_LIBRARY_DIR='path_to_boost_libraries'

How to compile a Qt program without installing sdk

Can someone tell me if it's possible to compile a project that works with Qt but without installing the entire sdk ? I mean, something like recompile Qt source code and link the libraries or something like this.
I know my problem is weird but I work in special conditions : I am on a linux machine and I have to work on a windows project therefore I use a distant server on windows to compile but I can't install anything on this serveur. I need an idea to have a fully portable folder with Qt who can compile without installing anything.
I hope I was clear in my explications.
Thank you for your help.
I has combined comments in answer.
You need to install compiler (e.g minGW) and Qt Library (as needed version).
You should add into environment variable 'PATH' your path to qmake and compiler.
Start terminal and move to directory with your source code of Qt project.
Run qmake and then exec make (e.g. It, for minGW, is mingw32-make).
For your case, you may choosen 2 way:
Build static Qt Library from source code and use static linking with your project.
Install Qt Library and copy libraries near your project with dynamic linking (recomended).