Saturday 14 September 2013

Getting Started with Bloomberg Standard Library

A quick guide to getting started with the Bloomberg standard library from their github repo:

Let's say for now I'm installing to ~/bsl on my linux machine with GNUMake:

Linux 3.11.0+ x86_64 x86_64 x86_64 GNU/Linux

For other flavours, see the official wiki.
  • cd ~/
  • git clone https://github.com/bloomberg/bsl.wiki.git
  • cd bsl
  • python tools/bsl_gyp.py
  • cd build
  • make all
  • ...have a coffee..
 Done!

Now you want to write your first program using bsl. Simple:

  • cd ~/test
  • Write a test program:
#include <bsl_vector.h>

int main()
{
    // A simple program illustrating bsl
    bsl::vector<int> v;
    v.push_back(4);
    return 0;
}
  • compile: gcc main.cpp -I~/bsl/build/include -L~/bsl/build/Release/lib -lbsl -lstdc++

Can we just autofill city and state? Please!

Coming from a country that is not the US where zip/postal codes are hyper specific, it always drives me nuts when you are filling in a form ...