I cloned the current boost sources from the github repository: https://github.com/boostorg/boost including all referenced child repository.
I did boostrap and build the sources on a OS X machine with the latest XCode command line tools. The build seems to work fine.
But in the $BOOST_ROOT/boost/ directory, where the header files are linked from the library directories (e.g. /boost/graph/adjacency_iterator.hpp -> ../../libs/graph/include/boost/graph/adjacency_iterator.hpp), some of the header files are missing. For example there is an boykov_kolmogorov_max_flow.hpp in ./libs/graph/include/boost/graph which is missing in the build output. The same happens if I call the install target. The header files are missing in the destination.
What do I have to do, that all header files get included in the build.
Regards
Joachim
As you can see in the documentation (Installing Modular Boost) you should
./bootstrap.sh
./b2 headers
to link the headers to the include directory when using Modular Boost
Related
I had an old version of boost and it was working fine. But now there is no boost folder in the repo? What is the include path and where are the .hpp files please?
The Repo Link.
Looks like the version of boost you had previously was the release archive. This is the recommended and supported way to use Boost¹.
The release archives can be downloaded here: https://www.boost.org/users/download/ - they include what you expect.
What about Github?
The github repository is NOT a release archive. Instead it is a "super-project" that you can recursively clone to get all constituent libraries.
The headers are not part of the super - project (obviously, because they belong to the constituent libraries). If you want to do "modular boost" you should "build" the headers, which effectively links (or copies) the headers from the subprojects into the main include folder.
The build instructions for non-header only libraries are here:
https://www.boost.org/doc/libs/1_80_0/more/getting_started/index.html
¹ other projects might support other ways, like biicode, conan, vcpkg even Debian's apt install libboost-all-dev of course
I have an existing C++ cmake project and I want to use tensorflow in it as a third party library. I searched extensively but all the solutions involve installing tensorflow at the end or copying the files to /usr/local directory.
My problem is I don't want to make any changes to the system directories and everything should happen within my project directory.
So, I compiled libtensorflow_cc.so and libtensorflow_framework.so from tensorflow source code and copied into my project directory. I added below code in my CMake to link these libraries.
find_library(tensorflowlibfwk libtensorflow_framework.so
PATHS ${PROJECT_SOURCE_DIR}/thirdparty/lib)
find_library(tensorflowlibcc libtensorflow_cc.so
PATHS ${PROJECT_SOURCE_DIR}/thirdparty/lib)
target_link_libraries(tensorflowtest ${tensorflowlibfwk} ${tensorflowlibcc})
I have no idea about which headers should I include to use the tensorflow in my project ??
Any kind of help please
I'm a newbie to bazel. I build a lib from tensorflow source. But How to automatically generate include directory, including all headers. Thank Thank you! !
now I got a libxxx.so(using tensorflow/core/so_many_header.h) from bazel build. I need some include files, when using libxxx.so. But where are headers files?.
I'm currently trying to use the Dlib c++ library in my own project. So I included the main folder of dlib to my project. I also added the dlib/all/source.cpp to my project. When I try to compile the code of the svm_c_ex.cpp example in my own test.cpp file, I only get:
fatal error: dlib/svm.h: No such file or directory
The section Dlib: How to compile didn't help me and I couldn't find further information online. Any help is appreciated!
You need to compile the DLib library first, using the instructions from the website.
cd examples
mkdir build
cd build
cmake ..
cmake --build . --config Release
cmake is a famous tool to build software on multiple platforms. It generates required files first and then you can compile the library using those generated files later.
You need to add the "include" directories (the folders where the headers exist) in your project configuration. I'm quite not sure of where exactly to add in Eclipse CDT.
After that, your program gives linker error because the the header files only contain skeletons of your library code. Actual implementation need to be linked with "linker options" in project properties. You need to add your library's .lib/.a files with your program. I don't exactly remember where is linker options in CDT (I'm talking in Visual Studio context)
Basically for any library you want to use in any C++ project:
You need to include HEADERS in your project properties
You need to link to actual implementation of the library. You can read about
static and dynamic libraries (Someone on SO must have given an
awesome explanation)
I followed these instructions to install boost and to compile all libraries:
https://www.quantnet.com/threads/tutorial-quantlib-boost-installation-in-visual-studio-2012.11891/
Boost Installation The Boost library can be downloaded here.
Currently, the latest version available is Boost 1.52.0. You can build
boost by following the instruction here.
Alternative you can download
a pre-built lib from here. Once downloaded, copy the installer into
the Boost 1.52.0 folder and run it. Rename the folder to lib once
done.
So I downloaded boost 1.52, then copied that to C:\Program Files (x86)\boost\
I then downloaded the 1.52 64 bit installer and once downloaded, pasted that to:
C:\Program Files (x86)\boost\boost_1_52_0\boost_1_52_0\
I executed the installer- it said "extracting" and then many library names.
I then renamed the last folder to lib, so that I had:
C:\Program Files (x86)\boost\boost_1_52_0\lib\
In my VS2012 I then added the previous directory to my project. The project then starting parsing through the libraries and I had no linker errors. However, when building the project I still got:
LINK: fatal error LNK1104: cannot open file
'libboost_date_time-iw-mt-gd-1_52.lib'
(The only usage of boost in my project is file_mapping and mapped_region)
Help?
EDIT: I am aware about some libraries needing to be compiled separately in boost. I thought the above was to achieve this? If not, could someone please advise how because this really becomes a pain.
Boost has some libraries (most of them) used as source headers (.h files) that do not need to be pre-compiled, but there are also some libraries that need to be pre-compiled (.lib files). You can either download the libraries pre-compiled from the Boost website (http://www.boostpro.com/download/), although you might get some older versions from there, or compile them (the latest version or any of those available you want) on your own, although please have in mind that this might take some time, depending on your computer specs. See here for more: http://www.boost.org/doc/libs/1_54_0/libs/regex/doc/html/boost_regex/install.html.
After downloading the "normal" boost package, put the folders/files extracted on a folder and then assocciate it in VS2012 by putting the folder path in
(YourProject > Right-Click > Preferences >)General > VC++ Directories > Include Directories.
Then download and install the pre-compiled libraries (extract them on a folder) and then associate this folder with the VS, in
(YourProject > Right-Click > Preferences >) Linker > General > Additional Library Directories.
Of course, as mentioned before, you can also compile the packages you want, and then associate them with Visual Studio the same way.