In this project I used different static libs, as cryptopp and others, so I'm quite sure my .pro file includes the right macros. I had already tried to do what giorgik suggested, but the result was the same. By now, I'm using the shared opencv library, to avoid spending too much time, and after the end of the project, I'll return to face this matter.
Thanks to everyone!