Dependency Injection framework for C++ [closed]

There is nothing as mature or standard as Guice in the C++ world. However, some people have put together simplistic implementations on their own. Here's a couple.

  • http://adam.younglogic.com/2008/07/dependency-injection-in-c/ (source for implementation is at the end of the post)
  • http://sourceforge.net/projects/qtioccontainer/ (requires Qt)
  • http://code.google.com/p/autumnframework/ (hasn't been touched since 2007)
  • http://programmaticallyspeaking.blogspot.com/2010/04/beautiful-dependency-injection-in-c.html (more of a description, really)
  • http://sourceforge.net/projects/cpp-resolver/ ("Alpha" quality)

You're unlikely to be satisfied by any of these.

If you really wanted to put in the effort to rally the world around a DI framework for C++, probably the way to go about it would be to make a proposal to the Boost guys.


I'm the author of wallaroo. It's actively developed and has the following features:

  • it's lightweight but powerful
  • its interface supports both C++11 and C++98 with boost
  • it's type safe
  • it doesn't need custom preprocessors / code generators
  • you can load classes defined in shared libraries
  • you can use a DSL syntax for object creation and wiring or
  • you can get object creation and wiring by parsing one or more xml / json file.

Any comment, suggestion or request are welcome.