Hello Brian, >However, many people do run into problems when they build x64 >applications on Windows becasue they wrongly assume that long types have >64-bits when in fact these types have 32-bits on Windows. To obtain a >64-bit type 'long long' has to be used.
>MPIR itself has two predefined (signed and unsigned) integer types - >mpir_si and mpir_ui - that avoid this problem by being defined as 32-bit >types on win32 and 64-bit types on x64. If these are used in building >applications, it is often be possible to avoid many (but not all) of the >issues that turn up in porting win32 applications to x64. Does the above mean that the user needs to change the mpirxx.h file to a specific arithmetic type? I am trying to use the open source libDAI library and am having several errors and warnings with the mpirxx.h file, for instance: Error 1 error C4146: unary minus operator applied to unsigned type, result still unsigned C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\mpirxx.h 118 1 GBP1 Warning 18 warning C4244: 'argument' : conversion from '__int64' to 'mpir_si', possible loss of data C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\mpirxx.h 1543 1 GBP1 Do you know how to fix these errors/warnings? Thanks in advance. Guillermo. On Friday, May 30, 2014 5:53:04 AM UTC-7, Cactus wrote: > > On 30/05/2014 00:25, Guillermo Ramírez wrote: > > Hi, > > > > I followed the instructions on the MPIR 2.7.0 manual on how to build > > MPIR with Microsoft Visual Studio. I am using VS2013 and a x64 system > > with i5 core. I also did the suggested testing for > > MPIR mpir/build.vc12/mpir-tests/run-tests.py and it worked. > > > > However, the header file mpirxx.h is not updated when bulding the c or > > c++ libraries. The files mpir.h, mpir.lib, mpir.pdb, mpirxx.lib and > > mpirxx.pdb are succesfully generated. > > The file mpirxx.h is a part of the MPIR distribution and is not > generated during any build. It is, however, copied into the mpir/lib or > mpir/dll directories when any MPIR library is built with Visual Studio. > > I am using the release and x64 > > options to build the mpir libraries for the lib_mpir_core2 and > > lib_mpir_cxx projects. > > > > Is it ok that I choose the x64 system? I know some people have had > > issues when building 64 bits libraries. Is there any missing steps in > > the MPIR manual? Hopefully you can give me some insight on this. > > The x64 libraries on Windows are stable and do not have any issues that > I know of that cause problems (the win32 code is now only being > maintained as legacy code so the x64 code is the 'mainline' MPIR code on > Windows). > > However, many people do run into problems when they build x64 > applications on Windows becasue they wrongly assume that long types have > 64-bits when in fact these types have 32-bits on Windows. To obtain a > 64-bit type 'long long' has to be used. > > MPIR itself has two predefined (signed and unsigned) integer types - > mpir_si and mpir_ui - that avoid this problem by being defined as 32-bit > types on win32 and 64-bit types on x64. If these are used in building > applications, it is often be possible to avoid many (but not all) of the > issues that turn up in porting win32 applications to x64. > > best regards, > > Brian > > -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscr...@googlegroups.com. To post to this group, send email to mpir-devel@googlegroups.com. Visit this group at http://groups.google.com/group/mpir-devel. For more options, visit https://groups.google.com/d/optout.