how to include mpfr package in mingw w64 compiler?

2 views (last 30 days)
I am trying to compile a mex file containing mpfr.h library with MinGW w64 compiler.
It gives me following error information:
fatal error: mpfr.h: No such file or directory
#include "mpfr.h"
^
compilation terminated.
The output of mex -setup is
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
Is the MinGW64 Compiler has mpfr lib built in? if not, how I can inlcude this external library into the MingW64 Addon app?
  5 Comments
KF
KF on 21 Jul 2020
Thanks again for your help! You are correct. The 32 bit version has it packaged already. For the 64 bit version, I ended up with installing gmp and mpfr lib with a seperate MSYS/MinGW64, then directed the MATLAB MinGW addon to search the build folder.
Does that sound a reasonable approach? The mex compilation went through for now. Is there anything I should be aware of? e.g. some rounding error or incompatibility issue?
Walter Roberson
Walter Roberson on 21 Jul 2020
That sounds like a bit clumsy of an approach to install, but on the other hand it is something you had some guides available for, so it might have been someone easier for you than figuring out the pure MinGW approach. You got it done and that is the important thing ;-)

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!