Hello---

mex -I/usr/local/include T_Zeta.cpp mpreal.cpp /usr/local/lib/libgmp.a 
/usr/local/lib/libmpfr.a
Mex files are basically shared libraries, so I think you shouldn't be linking
the non-PIC static versions of mpir/mpfr into your .mex. Does it work with the
dynamic versions of mpir/mpfr?

-Willem Jan

Thank you for your response, Willem. Working with GMP, I've found that linking with shared libraries does not work since the linker becomes confused. Apparently Matlab is also using an older version of GMP.

>> mex -I/usr/local/include T_Zeta.cpp mpreal.cpp /usr/local/lib/libgmp.dylib /usr/local/lib/libmpfr.dylib
>> [re, im] = T_Zeta(13.000)
??? Invalid MEX-file '/Volumes/FILES/DEVELOPMENT/reconstruction-algorithms/calculate-T-Zeta/T_Zeta.mexmaci': dlopen(/Volumes/FILES/DEVELOPMENT/reconstruction-algorithms/calculate-T-Zeta/T_Zeta.mexmaci, 1): Library not loaded: /usr/local/lib/libgmp.3.dylib Referenced from: /Volumes/FILES/DEVELOPMENT/reconstruction-algorithms/calculate-T-Zeta/T_Zeta.mexmaci Reason: Incompatible library version: T_Zeta.mexmaci requires version 9.0.0 or later, but libgmp.3.dylib provides version 8.0.0.

Apparently version 8.0.0 is used by Matlab itself, and can be found in the following directory:

/Applications/MATLAB_R2010aSV.app/bin/maci/libgmp.dylib

I would like to try this with MPIR, primarily because MPIR has a focus on cross-platform capability and use. However, I am uncertain as to how it may be possible to link MPIR with MPFR.

I don't see anything about linking MPIR with MPFR on the http://www.mpir.org/ website. Perhaps I am looking in the wrong place?

Nicholas


--
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-de...@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to