Some interesting results, I did get it working, but not in a good way. These are the steps I took:
1) Ensuring my version of MinGW is 4.8.1 with:
g++ -v
Result: gcc version 4.8.1 (tdm-2)
2) Compiled using the line from the readme:
g++ -Wall -O2 -L. -lLeap Sample.cpp -o Sample
This confirms using g++ to compile and not gcc
Result running Sample.exe: __gxx_personality_v0 linker error
3) Added in the -lstdc++ to the compile line:
g++ -lstdc++ -Wall -O2 -L. -lLeap Sample.cpp -o Sample
Result running Sample.exe: __gxx_personality_v0 linker error
4) As recommended on stackflow, copied in the libstdc++-6.dll file from the c:\MinGW-4.8.1\bin folder into the folder of Sample.exe
Result running Sample.exe: __gxx_personality_v0 linker error
5) Searched my drive for all instances of libstdc++-6.dll. I found six packaged into various software installs. Trying each from the various packages (thei file sizes varied) gave various results:
* Result from the one in AVIdemux: The procedure entry point ZNKSt8__detailPrime_rehash_policy11__etc etc
* Result from the one in Gimp: The procedure entry point __gxx_personality_v0 etc etc
* Result from the one in Tiled: The procedure entry point ZNKSt13badexception4whatEv etc etc
6) However I copied libstdc++-6.dll from the Video Editor - Shotcut. And it worked. Sample.exe starts the test numbers and responds to the leap motion. What I cannot understand is that I compiled using my Sample.exe with my MinGW and so I expect the libstdc++-6.dll packaged with it should work better than one from a foreign package like Shotcut.
The only thing I can conclude is that perhaps there is another compile flag I need to add to g++ so that the Sample.exe matches how MinGW's bin/libstdc++-6.dll was compiled. I'll keep digging.