I've tried using the mingw built mpir library with MSVC , and some of
it works.

building the static library with --enable-alloca=malloc-noreentrant

cl jay.c -I mingw_static_noalloc mingw_static_noalloc\.libs\libmpir.a /
MD
where jay.c is some mpz stuff with mpz_out_str for output  works.

using mpz_printf fails with
libmpir.a(printffuns.o) : error LNK2019: unresolved external symbol
___mingw_vfp
rintf referenced in function _vfprintf
libmpir.a(doprnt.o) : error LNK2019: unresolved external symbol
_isascii referen
ced in function ___gmp_doprnt
libmpir.a(doprntf.o) : error LNK2019: unresolved external symbol
_snprintf refer
enced in function ___gmp_doprnt_mpf2
jay.exe : fatal error LNK1120: 3 unresolved externals

For the shared library it looks like it has been named wrong(same for
cygwin) .
we have libmpir-3.dll.def libmpir-3.dll.a libmpir-3.dll.aT   , when we
run lib to convert them and compile it etc , and then run the
resultant executible we get the error message cant find
libmpir-3.dll.dll   , so I renamed it to libmpir-3.def  etc , theis
time the executible just crashed , but it look like it work if we do
no input or output

So on the whole,  pratically all of it works , I think , but there is
lot of little broken bits which mean it's not usable.

I would suggest to do any application in just mingw , or just cygwin
or just MSVC , I wouldn't recommend trying to mix up the librarys yet.




On Jun 20, 4:37 am, jason <ja...@njkfrudils.plus.com> wrote:
> As a summary of what I know that works
>
> cygwin---------
> Everything works , static and shared librarys can be build(but
> separately)  , they pass make check
> and they install correctly  into /usr/local  , so they are availible
> for the usual build process with no extra paths required.
> The compiled exe's can be run as normal in the cygwin enviroment.
> This exe can also be run from the usual window command.com shell
>
> put cygwin1.dll in your path
> ie like
> set PATH=c:\cygwin\bin;%PATH%
> your.exe
>
> there are other better ways eg compile with -mno-cygwin etc , but you
> have to be carefull about input/output and other things
>
> You can only install shared or static NOT BOTH
>
> mingw------
> Standard install needs some tweeking , get at least core-1.0.11  type
> touch.exe /bin/install /bin/install-info.exe
> which is needed for vista at least
> static and shared can be built (but separately) , static passes make
> check , shared fails make check ,but the the library is OK , they both
> install correctly into /usr/local  , but the stardard paths are not
> set to include these so either put them in your path or build with
> gcc your.c -o your.exe -lmpir -L /usr/local/lib -I /usr/local/include
> the compiled exe can be run in the mingw/msys enviroment
> the compiled exe(with static library) can be run in the normal windows
> shell with no tweeks
> the compiled exe (with shared library) can also be run in the normal
> windows shell with this
> put libmpir-3.dll in your path ie with
> set PATH=c:\msys\1.0\local\bin;%PATH%
> You can only install shared or static NOT BOTH
>
> for MSVC--
> Brians projects offer and easy build if you the latest MSVC , and Jeff
> reports that the free one works as well.
> Personally I prefer the command line , We should have a command
> solution for MSVC within a week or two.
>
> I've not tried mixing and matching from MSYS to MSVC  yet , should
> work.....
>
> Jason
>
> On Jun 19, 1:15 pm, William Stein <wst...@gmail.com> wrote:
>
>
>
> > On Fri, Jun 19, 2009 at 1:11 PM, Bill Hart<goodwillh...@googlemail.com> 
> > wrote:
>
> > > Actually, now that I read the instructions in the manual, I am unsure
> > > whether .lib files can only be created for dll files. You are creating
> > > .a files because the test code doesn't work for dll's.
>
> > > Maybe my suggestion of creating a .lib file won't work.
>
> > > But if so, then I am unsure why MSVC is not working with the .a file
> > > you have made with MSYS. You could try changing the calling
> > > conventions. I think it uses cdecl by default an maybe it should use
> > > stdcall, but that is only a guess.
>
> > > Maybe Jason Moxham has time to play around and figure out how to make
> > > this work?
>
> > > I'm really tempted to just say MPIR does not support MSYS at all. But
> > > I think that would be a mistake, as there are lots of people who use
> > > MSYS.
>
> > > Bill.
>
> > You might say that MSYS doesn't "support" very well building libraries
> > that can be used by MSVC.
>
> >  -- William- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@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