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.)
Well, the non-presence of a library isn't necessarily a fatal error. Anyway, it's of course better to first keep going to potentially emit further error messages, in this case the unresolved symbols. > [...] > 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). The 'error LNK2019' certainly comes from a M$ compiler (more precisely, its linker). You can also use GNU Binutils' 'dlltool' to create M$-compatible import libraries (*.LIB). -leif -- 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.