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.
Related
I managed to create a shared library that use CGAL 5.0.1 extensively. Now, my question is, would it be possible if I take this new shared library to other computer without CGAL already installed.
From CGAL's website:
Since CGAL version 5.0, CGAL is header-only be default, which means
that there is no need to compile CGAL or its libraries before it can
be used.
This page is for advanced users that have a good reason to still use
the old way. If this is not your case, head over back to the page
Getting Started with CGAL.
The way I understand this is that since there is no need to compile CGAL, there is no need to install CGAL if we already have the shared library. Is this correct? Thanks, I'm pretty new to C++ and all the related stuffs.
When you use CGAL header only, no CGAL shared library is built.
When you build a shared library, you must distribute it together with your executable. The user of your application does not have to install CGAL.
What I write here is not CGAL specific.
I have troubles with building boost libraries.
I am using version 1.55 on OS Win7.
According to documentation and another thread I found switches that work to build boost with zlib support.
I haven't found a way, how to build boost (static or dynamic) libraries with zlib being external dependency, and will be shipped with my application. In that way, any user can build/change his own zlib, as long as the interface is unchanged.
I such thing possible? Does boost support dynamic zlib linkage?
Finally, I was able to solve the problem with the following.
There is a bug in versions 1.55 and above. Building static libraries can be done using older jamfile (1.53).
For the dynamic library, you need to add zlib.cpp to your project and compile.
With dynamic, meaning there is only zlib.dll linked directly to your project.
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).
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 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.