Thank you very much for your replies guys.

I found what's the real problem: the destructor in the class Matrix is pure virtual, making it just virtual and giving him an (empty) definition the code works.

I found this link: http://www.devx.com/tips/Tip/12729 which basically say that a destructor can be pure virtual but still must be defined.

It was my mistake, I was blind as always.
I will keep coding this way.