Fwd: How to Use

19 views
Skip to first unread message

Jason

unread,
Nov 30, 2010, 5:44:09 AM11/30/10
to mpir-...@googlegroups.com

---------- Forwarded Message ----------

Subject: How to Use
Date: Monday 29 November 2010, 05:14:15
From: George Ulmer <geo...@boost-media.com>
To: themp...@gmail.com

Hi,

I downloaded and read readme and pdf but could not figure out how to use
with Visual Studio 2008. I searched on website and google group but
found nothing.

What kind of project do I need? What about all those wacky options like
PCH, ATL, MFC, etc. They always make it impossible to compile libraries
that I download.

If you can tell me how to get it to work on VS 2008, I can provide a
complete solution that people can download and use.

Thanks!

George

-----------------------------------------

Cactus

unread,
Nov 30, 2010, 8:38:38 AM11/30/10
to mpir-devel


On Nov 30, 10:44 am, Jason <ja...@njkfrudils.plus.com> wrote:
> ----------  Forwarded Message  ----------
>
> Subject: How to Use
> Date: Monday 29 November 2010, 05:14:15
> From: George Ulmer <geo...@boost-media.com>
> To: thempirt...@gmail.com
>
> Hi,
>
> I downloaded and read readme and pdf but could not figure out how to use
> with Visual Studio 2008. I searched on website and google group but
> found nothing.
>
> What kind of project do I need? What about all those wacky options like
> PCH, ATL, MFC, etc. They always make it impossible to compile libraries
> that I download.
>
> If you can tell me how to get it to work on VS 2008, I can provide a
> complete solution that people can download and use.
>
> Thanks!
>
> George

Hi George

You should be able to build MPIR using the Visual Studio 2008 build
files that are a part of the MPIR distribution.

If you are, instead, asking how to use the MPIR libraries in other
projects, the settings you will need will depend on what type of
project you are trying to build.

The default settings for MPIR are for building console applications.
If you want to use MPIR as a part of an application using the Windows
GUI (ATL, MFC, ...) you will have to modify the MPIR project settings
to match the build configuration of the application you are trying to
build.

regards,

Brian



> -----------------------------------------

Antony Vennard

unread,
Nov 30, 2010, 10:30:56 AM11/30/10
to mpir-...@googlegroups.com

I thought the default settings for MPIR were to build MPIR, either DLL
or LIB depending on requirements, for various cpu arch's. MPIR is not in
either case a console app and /SUBSYSTEM:WINDOWS is probably what in
effect happens, althougn neither a Windows GUI nor console window is
produced.

Basically, there are about 26 billion options for producing your
application in C++ on Windows. You have Active Template Library (ATL)
which as far as I can guess is Microsoft's STL++ (from the era when
everything was prepended with Active, like ActiveX and Active Server
Pages). You have Microsoft Foundation Classes, which were designed to
make writing Win32 applications easier... errm... and a few other
options for good measure. A "Win32 Application" or a "Win32 Console
Application" is a pure Win32 code (the actual Windows API. Finally of
course there's C++.net which isn't sure whether it's managed or not.

Ultimately, what you want is two things. You want to choose A MPIR
project and build that. Brian has created projects for every build
configuration of MPIR he supports on Windows, so core2 = intel core 2
processors. You pick one of these. You even get to choose whether you
have a DLL or LIB. Then inside that project I think you can build either
the Win32 or x64 version in the platform drop down. That's what Brian is
getting at.

You then need to ensure you are using the same CPU architecture for
whatever you're creating in your project which will use MPIR. So if you
chose x64 MPIR, you need an x64 project platform. No point in a 32-bit
app calling a 64-bit dll; I'm pretty certain it wouldn't work. Most
projects don't differentiate between CPUs (MPIR does because it's tuned
to each cpu) so you don't need a version of your project per every piece
of computer architecture out there, but MPIR does to be fast enough for
research etc.

But, it makes no difference whether you use ATL, MFC or plain old Win32
in your own project, the project using MPIR. Actually, you could use
Java. or C++.net if you know what you're doing. So all you need to make
sure of is that if you're doing unmanaged C/C++, you keep the
architecture (VS calls them Win32/x64) in sync with the version of MPIR
you've built. Then, you just include the dll or lib and hey presto, MPIR
in your project.

Hopefully that makes sense, I got the feeling things were a little unclear.

Antony

Reply all
Reply to author
Forward
0 new messages