I have a similar question regarding using Boost under Windows. I'm very new to Boost and I just installed the Boost library on my Mac, I'm interested primarily in the Boost Graph Library. My questions are as follows, when installing Boost by default on my Mac, is the BGL installed automatically as well? I ask this because the Boost website talks about the BGL being a header-only library that does not need to be built. My next question is, how do I access the BGL and use it in Eclipse on Mac?? Your help is appreciated.
I have used the Boost Graph Library on Windows and on several Unix flavors, but not on Mac. But I think my comments are relevant nevertheless.
You are confusing the library being installed with the library being built. When you installed Boost on the Mac, the BGL is also "installed", in the sense that the BGL headers are copied the Boost's include directory.
In order to use the BGL you do not have to build and link to a library or dll (or whatever they are called on Mac). All the code is in these header files, and will be pulled into your code when you #include it.
As to eclipse. I do not know.
Related
For any C++ Boost library, how can one find out which Boost library(ies) it requires ?
Example (not necessary a working example though): Boost library "test" requires Boost library "date_time".
Regards,
boost comes with a tool to gather the dependencies of a library.
It is called bcp. If you just want a list of files, you have to use the --list option.
If you want to find out those dependencies to isolate the components your software requires, you can use bcp (Boost Copy)
It copies selected boost libraries and all its dependencies to a target location.
Eg
bcp regex /foo
copies the complete regex library and its dependencies to /foo
Disclaimer: I do not have any practical experience with bcp.
EDIT:
If you only want to check on which compiled library a compiled library depends, you can either use ldd <boost_library_filename>.so on Linux or Dependency Walker on Windows.
A modern solution is to use boost
Dependency Report (available starting from boost v1.66.0).
I would like to know if it is possible to get the binaries for the static library for windows (x86 and x64) now present in cpp-netlib for the version 0.9.1?
Frankly it is a pain to compile this on windows for me.
Thanks
New version's of cpp-netlib now do require building. I have answered how to build it on here
It seems that cpp-netlib is a header-only library, although it relies on some boost compiled libraries, such as Boost.System, Boost.Date_time, and Boost.Regex. You can easily find boost pre-compiled libraries all over the Internet. You will also need the boost headers to be in your build path as well. Even though cpp-netlib says that Boost 1.41.0 will do, in actuality, version 0.9.1 requires Boost version 1.46.0 or later (just grab the latest which is 1.47.0).
You could also try defining BOOST_NETWORK_NO_LIB which should help out.
I want to use Boost core libraries (like lambda) and Boost ASIO library in a large cross-platform project built with the Cmake. I want to put Boost & ASIO in my source control tree and build it as part of project with the Cmake. So I don't want to "install" it on computers and link with it.
How can this be done? Does there exist CMakeLists.txt for Boost?
Both Boost.Lambda and Boost.ASIO are header-only libraries, so in your CMakeLists.txt file, you could include your Boost include directory in the INCLUDE_DIRECTORIES variable, and when your code is built, the header code will be built into your resulting modules.
For situations where you are using non-header-only libraries, like Boost.Filesystem, then you will have to either ship libraries you built, or modify the experimental CMake version of boost.build, which you can find here: https://svn.boost.org/trac/boost/wiki/CMake
Edit
I was slightly confused about Boost.Asio. It is not truly header-only, because it depends on Boost.System, and possibly Boost.Thread depending on how you use it.
However, Boost.Asio is derived from Asio ( http://think-async.com/ ), which is header-only.
There is a project aiming at providing a CMake version of boost. It is quite outdated, but the CMakeLists.txt might help you. You can check it out there.
im just installing the boost library using an installer.
Its asking me which variants (about 8 options, 6 multithreaded and 2 single threaded) do i want to install. Im only installing this to get to grips and have a practice with boost, so im unsure?
Also, how do i use the libraries from VS02010 once ive 'installed' them using the installer?
thank you in advance
Boost documentation is your friend. A read of the information on getting started on Windows would save you much time.
Most of the libraries are header-only. You can use these just by including the correct headers as described in the individual library docs. If you want to use any of the ones that are not, you are going to need either to build your own libraries, or install the ones that come prebuilt. This is what your question pertains to. So you really must answer your own question - what is your target platform, and do you have to support multi-threaded programming? if in doubt, install them all and use the ones you need on a case-by-case basis.
To use the Boost libs once you have installed or built them, just include the relevant library in your project Linker options as for any other static library.
I want to use Boost library in my iPhone project, specifically only boost::numeric::ublas. I managed to build static libraries for boost in order to link them in my iPhone project. However, when I look at those .a libraries I can't find one that's related to ublas (I tried ./bootstrap.sh --with-libraries=ublas in terminal but no luck). Does anyone know which static library to look for ublas? Or how to use ublas in an iPhone project in general?
Thanks!
uBlas is header-only so there is no static library - see this view of the libraries:
http://www.boost.org/doc/libs/1_44_0/?view=filtered_header-only
If you are OK with running iOS4 only, use the Accelerate framework, it has BLAS and features hardware acceleration (when available, software otherwise).
Even if you need 3.x support, it would be worth figuring out how to toggle the use of Accelerate when possible just to get the hardware support.
I can't answer the iPhone-specific part but I can help at least with the Boost part...
Boost uBlas is a header-only library so you don't need to build and link against any .a files. Just include the headers in your project if you want to use the library.