As I said in the title I have created a software that contains a library that has FOSS license..
1) can I distribute my project with proprietary license (either sell it or give it for free) ?
2) If not, what should I do?
Open Source Stack Exchange is a question and answer site for people organizing, marketing or licensing open source development projects. It only takes a minute to sign up.Sign up to join this community
Secondly, wikipedia says of the MPL that
Unlike strong copyleft licenses, code under the MPL may be combined with files under any license in a "larger work", so long as conditions for the MPL are still met for "covered" components (Section 3.3 of the license). The MPL treats the source code file as the boundary between MPL-licensed and proprietary parts, meaning that all or none of the code in a given source file falls under the MPL.
That is handy in one respect, which is that, given that you aren't modifying this MPLed library, we don't have to take a position on whether linking to a library creates a derivative work of that library.
As I read it, if your code links in a library covered under MPL, you can release the resultant executable under any licence you like, including a proprietary one. You would need to make the source of the MPL'ed library itself available, on the MPL's terms, to those to whom you conveyed the executable. This comes from section 3.2 of the MPLv2, which requires that
such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient
but as long as you comply with that, I don't think it mandates restrictions on the licence for your code, which is linked in with this library.