On 04/08/2016 12:25, Robert Steed wrote:
> I'm a newbie. In Microsoft Visual Studio Community 2015 running on Windows 10 
> x64, I installed "mpir-2.7.2\build.vc14\lib_mpir_gc", WIn32 Release config, 
> as per instructions in "mpir-2.7.2.pdf", and all the tests in 
> "mpir-2.7.2\build.vc14\mpir-tests" were successful. I wrote a tiny first 
> program which calls mpz_set_si(), included "mpir.h", got this build error:
>       Error   LNK2001 unresolved external symbol ___gmpz_set_si
> So I included "gmp-impl.h", even though that isn't mentioned in 
> "mpir-2.7.2.pdf". Now I get this build error:
>       Error   C1189   #error:  no data available for this limb size in 
> perfsqr.h
> 
> What is that about, and how do I get up and running? Is there some resource 
> for beginners anywhere with comprehensive instructions or tutorials on how to 
> use MPIR? How is a beginner supposed to learn how to use MPIR?

Hi Robert,

To use MPIR in a Visual Studio project you have to do two things. First
you have to include "mpir.h" as you have done. Second, you have to add
the relevant MPIR library to your project. It seems likely that you have
not done the latter.

Assuming that you are using the static library (mpir.lib), you need to
add this to your solution by using the Visual Studio 'Properties'
dialogue (an option when you right click on your solution in the
Solution Explorer).  You need to find the location of the library (e.g.
lib\win32\release\mpir.lib) and add it to the 'Linker|Input|Additional
Properties' item.

Alternatively, right click on your solution in the Solution Explorer,
select 'Add|Existing item', navigate to the library in the file dialogue
and select it to add it to your project.

I hope this helps, if not just get back to me and I will see what I can
do to help further.

   Brian








-- 
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 https://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to