What is an easy way to do a PCA in C++

  alglib, c++, opencv, pca

I have a 2d vector of floats that I would like to do a PCA on. I do not need a full PCA, 10-15 components is fine. I have tried OpenCV and Alglib but it seems like a lot of effort just for a PCA.

Source: Windows Questions C++