Build and generate project for Avro C++

Posted on February 13, 2015 · Posted in Uncategorized

Here i am writing blog “how to create avro c++ project and build  project”.

What is Avro and why it needs ?

Avro is a serialization framework developed within Apache’s Hadoop project. It uses JSON for defining data types and protocols, and serializes data in a compact binary format. it is a data serialization system.

Though theoretically any language could use Avro.

Pre-requisites :

  • Boost
  • Visual studio
  • zlib
  • CMake
  • Avro tarball

Build Boost :

  • Unzip boost in local drive.
  • Start CMD from visual studio tools.
  • Goto root directory of boost from cmd.
  • Run “bootstrap” command.
  • Run “bjam –build-dir=”C:\boost1.5″ –build-type=complete toolset=msvc stage” command.
    • Here :
      • “–build-dir” is root directory of boost.
      • “stage” is library directory.
      • “toolset” is tool for build boost.

Configure Environment variable :

  • BOOST_DIR = c:\boost1.5 (Root Directory)
  • BOOST_INCLUDEDIR = c:\boost1.5\boost (boost Directory)
  • BOOST_LIBRARYDIR = c:\boost1.5\stage\lib (Library Directory)
  • BOOST_ROOT = c:\boost1.5 (Root Directory)

Create Avro cpp Project from tarball:

  • Get Avro tarball from above link and unzip.
  • Browse to cpp folder in tarball and create new folder “”.
  • Run cmake GUI.
  • Select our tarball c++ directory as source directory and tarball “c++/build” directory as build directory.
  • Add two entry of boost like below.


  • Than we have to do configure source code.


  • We have to select our platform where we want to run project. For c++ select visual studio and do finish.
  • Source code configure will take several minute for process after success it give message.
  • Generate source code in build directory.
  • Now browse to “c++/build” in source code and we have to open our project .sln file in visual studio. Default avro project sln file is “Avro-cpp.sln”.
  • We have to build our avro project in Visual studio like below.


This is how to create avro project in c++. If you have any doubt for generate source code or project build then comment here.

Thank you.

Share Button