1

I am using Visual studio community 2015 and I want to set up a projects with mpirxx.

Recently I' have compiled the mpirxx code to get the debug library file. In my project I have included the mpirxx.h file and linked mpirxx.lib, but when I try to compile I get 17 identical errors from mpirxx.h from multiple lines around the code.

Error C4146 : The unary operator 'minus' was applied to unsigned. The result remains unsigned.

Here's an example :

212 - __mpz_set_ui_safe(p, -static_cast<mpir_ui>(l));

Is this a know problem of the library? Should I change it? Any help is appreciated.

  • 1
    This is a known misfeature in visual studio. It can be disabled (don't treat warnings as errors, don't enable some "security" features (SDL)). – Marc Glisse Jan 18 '16 at 22:31
  • Looking at the context of each static_cast, `l` is always negative. So I think this is correct. Just disable 'treat warnings as errors' and ignore the warnings. – pticawr Jan 18 '16 at 22:44
  • Disabling SDL worked! Thanks for your time. –  Jan 19 '16 at 12:51

0 Answers0