Ask HN: Modern C++ development setup?
1 comments
Looks like OpenCV is using CMake: http://www.cmake.org/
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...
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...
Oops, I forgot to mention a few things...
Builds: Waf - https://code.google.com/p/waf/
Unit Testing: googletest - https://code.google.com/p/googletest/
waf tool for googletest - https://github.com/tanakh/waf-unittest
Logging: glog - https://code.google.com/p/google-glog/
Command line flags: gflags - https://code.google.com/p/gflags/
Batteries (ala Python's batteries included) - http://www.boost.org/
Finally... I've started looking at hayai for benchmarking since it's based on googletest's design: https://github.com/nickbruun/hayai
Finally... I've started looking at hayai for benchmarking since it's based on googletest's design: https://github.com/nickbruun/hayai
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.