4 points · by ekuality · 12y ago · 2 comments
For starters I want to be able to compile OpenCV (an open-source C++ program: https://github.com/Itseez/opencv) on my mac, and I'm not even sure where to begin with compilers, build and dependency management, etc. Is G++ the right tool to be using, or is there something else?
Aside from being able to compile OpenCV I'm also looking for general best practices for modern C++ development (particularly on a mac). Compilers, tooling, dependency management, etc. Any tips, tutorials, articles, you have would be very helpful.
My background is mostly on the JVM (Java, Scala) with some Node, Ruby, Python, etc.
Here's my setup: Vagrant http://www.vagrantup.com/ Clang http://clang.llvm.org/ Chef cookbooks for dependencies (like Clang)
Vagrant makes standing up a development virtual machine easy and repeatable. I prefer clang to gcc primarily for the (IMO) superior error messages. But, the "YouCompleteMe" plugin for Vim is a very nice additional benefit to using clang.
I would also recommend reading up on some of the changes to the language made in C++11 - the support for lambdas, for example, is wonderful.
Finally, with the latest version of Vagrant there is support for Docker containers, https://www.docker.io/ This holds a lot of promise. I'd recommend looking at that, too, as a way to build the development environment and required libraries once, in addition to using Chef for provisioning... think of docker as a shortcut to provisioning that can also be used in deployment...
Finally... I've started looking at hayai for benchmarking since it's based on googletest's design: https://github.com/nickbruun/hayai