Do I need to install Boost to build odeint? - c++

I am trying to solve ODE by using odeint package. The odeint website provides a download on their package. I downloaded the zip file included it in my project but it doesn't work.
I understand that if I download the whole boost package, it automatically includes odeint. I have succeeded on doing this.
But my question is "can I directly download the odeint files from odeint website and build it from there without installing the whole boost libraries??"
In our situation, we do not have enough time to ask students to download and build boost in class.
i.e. only download the odeint from the following website
http://headmyshoulder.github.io/odeint-v2/downloads.html
or
Github link
https://github.com/headmyshoulder/odeint-v2

No, you need to have the boost libraries. At least they need the headers need to be found. You can use odeint additional to the boost installation.
Nevertheless. If you use the latest version from boost you also get odeint, since it is contain in boost.

Related

How to systematically update a C++ dependency that I once manually installed from binary

Scenario:
I wish to use Google OR-Tools with it C++ version as a dependency in my C++ project. I choose to install it from binary. I download the binary file and use the provided Makefile to install it.
Question:
In the future, when a new version of OR-Tools is released, how do I update the dependency in my local project?
If I were using Python, JavaScript or Ruby, I'd use pip, npm/yarn or gem (i.e. package managers) to update dependencies. But since C++ doesn't really have one, how do I systematically update C++ dependencies that I installed from binary?
how do I systematically update C++ dependencies that I installed from binary?
Write a script that fetches and installs the dependencies however you wish or setup one of the many package managers or build systems with package support that C++ has.
What I tend to do when my project relies on 3rd party code is create a Git repository for your project (if you don't already have one) and add the third party code as a Git submodule. That way, you can easily just pull the latest changes that were committed to the repository of the third party code.
You can optimize your workflow even more by adding this third party project to your project and change your project's config to consider the third party project to be a dependency. That way, it will compile the dependency every time a change was made to it.

Including antlr4 c++ runtime using cmake

I am trying to use antlr4 in my C++ project. I want to add the antlr4 cpp runtime as a dependency in CMake, but I am not sure how to proceed. The official tutorial uses old CMake syntax, and I am looking for something based on targets.
I was thinking about using Git submodules to download all of antlr4 and then use add_subdirectory to only include what I needed (antlr4/runtime/Cpp). However, that would force my users to download the entire source. Git clone has had a "filter" option since v2.19, but I don't think that's available for subdmodules.
I have been using FetchContent in the past, which was cleaner than submodules imho. However, I am not sure how that would work here, since I do not want to download the entire repo and the CMakeLists.txt file is not in the base folder.
How could I include the antlr4 C++ runtime to my project using modern cmake practices?
I just faced the exact same issue.
After a while of digging, and since no feasible alternative seemed to exist (except for adding the whole repository and just link to the runtime part, which is what you were trying to avoid), I created a standalone repository with the necessary runtime files to compile and link to, plus support for CMake target linking.
In case it is still useful somehow, take a look at it here.

How to configure bazel to build C++ app using tensorflow installed in python site-packages

This question is primarily about using bazel to develop a C++ application that uses a 3rd party package of headers and built libraries, with the headers accessible as system includes, i.e. using angle brackets to specify the headers: #include <header.h>
I expect this is a common use case but after an hour of searching documentation, I still don't see an obvious approach to try.
My particular use case is to use tensorflow 1.4 built from sources. Tensorflow was installed at this location on my system:
~/.pyenv/versions/3.6.3/envs/tensorflow14py36/lib/python3.6/site-packages/tensorflow
How do I modify my bazel BUILD and/or WORKSPACE so that I can compile (and eventually link) my application that includes tensorflow headers such as:
#include <tensorflow/core/public/session.h>
I've found a related question: How to build and use Google Tensorflow It appears the recommended solution closest to my expectations is to simply copy the headers and libraries to /usr/local/. I'd prefer a different solution, but for now, I am successfully using that approach.
I've also filed an issue with the Tensorflow team: https://github.com/tensorflow/tensorflow/issues/15290

Adding third party libraries to an OpenCV project on Xcode

I am new to the XCode environment so apologies if this sounds trivial.
I am trying to use a third party library using for OpenCV that helps me do some blob analysis, CCL etc. Hosted here
I have searched a lot but there doesn't seem to be much documentation on how to go about adding and using these new libraries. I am using XCode 4.5.2, OpenCV 2.4.2.
When I simply add all the header files to the project folder and #include them in the source code, it fails to compile. I have also tried adding the "Header Paths" but it doesn't help. What am I missing?
I have tried to follow the instructions (compiling it using the terminal but it doesn't compile too) I am not clear on how or when exactly to use CMAKE.
Any help will be appreciated. Thank you.
I would suggest you using CvBlob on google code which is different from the one on willowgarage, I have got recently confused with this so take a look at this question for alternative blob analysis libraries.
Moreover, CvBlob has also a good support community here. (Search on "[cvblobslib]" or on "[blob] [opencv]")
Try this: cvBlob: OSX installation
Once you get it compiled, you need to include the library under Link Binary with Libraries in Build Phases. (This screenshot shows the core, imgproc, and highgui libraries. Your cvBlob library would go in the same place.)

Using OpenSSL's CMS implementation in C++

So my project today has been to create a C++ class that consolidates a lot of our commonly used crypto tasks. Got lots of things working but ran into a bit of a snag here. For reference, I'm using XCode 3.2.5 on OS 10.6.5.
I'm attempting to utilize some of OpenSSL's CMS functions. OpenSSL's MAN Page for one of the functions I'm trying to use mentions it was included in version 0.9.8. That's the version XCode let me import without having to do anything out of the ordinary (Target -> General -> Add Linked Library). Yet with that added XCode tells me it can't find openssl/cms.h.
So thinking maybe there's some disparity between the OS X version 0.9.8 and the one on OpenSSLs page, I downloaded the source for 1.0.0c and built it. After it was built, I added libcrypto.a and libssl.a to my project as linked libraries and added "some/dirs/openssl-1.0.0c/include/**" as a header search path. Now it can find openssl/cms.h but I get a linking error on any CMS function I call.
Has anyone done this successfully? Any help would be appreciate.
Thanks!
So what I ended up doing was to create a new SDK and calling,
./Configure darwin64-x86_64-cc --prefix=/path/to/sdk/usr --openssldir=/System/Library/OpenSSL enable-cms shared
To update the version of OpenSSL included in that SDK. That's seemed to work.