On 19 June 2015 at 14:51, <sisyph...@optusnet.com.au> wrote: > > From: highcalcula...@gmail.com > Sent: Friday, June 19, 2015 8:06 PM > To: mpir-devel@googlegroups.com > Subject: Re: [mpir-devel] Re: MPIR MinGW installation - "undefined > reference to '_imp____gmpz_init' > > I would like to call it from Matlab using mex files, and there, the >> compiler complains that it does not see any ".lib" files (when compiling >> with "mex ... -lmpir" it looks for a file "libmpir.lib") . >> > [snip] > >> Compiler answer: >> "myfile.obj : error LNK2019: unresolved external symbol __imp___gmpf_init >> referenced in function "void __cdecl myfile(double)" " >> > > That's interesting ... you've given the directive to link to "-lmpir", > no such library is found, but instead of croaking then and there the > process continues anyway ? (I don't know Matlab at all.) > > Does it work if you rename libmpir.a (or whatever your existing mingw > import library is called) to libmpir.lib ? >
I don't think this will work. The .lib format is a Microsoft format, the .a format is a *nix format. > It's a while since I've tried to use mingw-built libraries with a > Microsoft compiler and I'm not sure whether that simplistic approach works. > > The fact that your object file is ".obj" instead of ".o" would indicate > that it's built with a Microsoft Compiler - so, if need be, you should be > able to build the requisite ".lib" file from the dll using your Microsoft > Compiler installation's lib tool (as Bill has hinted). > > Cheers, > Rob > -- > 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. > -- 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.