On 19 June 2015 at 16:28, Brian Gladman <b...@gladman.plus.com> wrote:

> On 19/06/2015 15:10, highcalcula...@gmail.com wrote:
> > Dear All,
> >
> > Thanks for your help. I do not see a file exactly called "libmpir.dll",
> > so if I really need to have "libmpir.lib" sitting in the .libs folder,
> > how would I get the former to convert it via the MS lib tool to the
> latter?
> > I tried to convert the two existing ".dll" files in the .libs folder,
> > namely "libmpir-3.dll" and "libmpir-16.dll" via the MS lib tool
> > (accessed via cmd) to their respective ".lib" counterparts (eg. using
> > this description
> > <http://asawicki.info/news_1420_generating_lib_file_for_dll_library.html
> >).
> > Then I used "-lmpir-3" resp. "-lmpir-16" in the mex command, which again
> > returned the
> > "...unresolved external symbol __imp___gmpf_init ..." message.
> > Specifically, I used the command
> >
> > mex -IC:/MPIR/mpir-2.7.0/ -LC:/MPIR/mpir-2.7.0/.libs/
> > -LC:/MPIR/mpir-2.7.0/mpf/.libs -LC:/MPIR/mpir-2.7.0/printf/.libs mexlib.c
> >
> > I also tried to add the MPIR root and .libs directories to the LIB and
> > INCLUDE variables in the mexopts.bat settings file, which did not help
> > anything.
> >
> > Rob: The above message, for each mpf_... function, appear if I set the
> > -lmpir or -lmpir-16 flag, but also if I don't.
> > Just changing the extension of "libmpir.la" to "libmpir.lib" did result
> > in a "file corrupt" message after mex, as Bill conjectured.
> >
> > Brian: How would I build an MPIR DLL using the native Microsoft and
> > Intel compilers? Is this here a necessary extra step?
>
> First you need to install a version of Visual Stduio.  This takes some
> time but only has to be done infrewquently.  Visual Studio 2013
> Community and Visual Studio 2015 Community RC are both free and MPIR has
> build files for both of these 'out of the box'.
>
> You open Visual Studio and load the mpir.sln file, select the version
> you want to build (e.g. DLL or Static Library), the architecture (e.g.
> Nehalem), the configuration (e.g. x64 and Release) and then select
> Build.  After this you can load the mpir-tests.sln file to build and run
> the tests.
>
>
You might have more luck building MPIR using Brian's MSVC build scripts
instead of using the MinGW configure/make/make install, etc.

I guess you still need to know how to use mex, e.g. what PATH variables
need to be set, what the files need to be called, and where they have to be
place, what commands to use to operate it, etc.

Anyway, these sorts of problems are the main reason we offer the MSVC
scripts. The MinGW build works fine (I use the dll's directly in another
project I work on), but for work with native Windows programs, it is often
just easier to use the native Windows tools (such as MSVC).

In theory it should be less uphill for Windows developers.

Bill.

-- 
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.

Reply via email to