Amber's link does provide a reasonable starting place, but I'll add a few additional notes:
Blockly isn't statically typed by default. C++ is. It's way easier to make Blockly work with static types (there's native support, you just have to set it up) than to build the necessary C++ infrastructure to handle Blockly's mixed types, especially if you want the resulting C++ code to look like something a human might have written, and especially if you don't want to have to define a wrapper function for every C++ library function you want to call.
Blockly isn't object-oriented. If you only intend to use Blockly for procedural control flow, this MIGHT not be a problem. If you want to define C++ classes in Blockly, you have a big chunk of work ahead of you. It's not at all unexplored territory, though; even Scratch manages to have a notion of objects and classes.
Ardublockly and Blockduino both have code generators that work with statically-typed C++-like code. I would suggest taking a look at those projects. You might even be able to use one of them directly if you don't need anything especially fancy.
/s/ Adam