Peter, you might be interested in the fact that Jason Moxham has been creating some batch files to automatically build MPIR in MSVC. That should make it a whole lot easier to do. No need to muck around with MSYS/MinGW at all.
For the moment you are having problems with combining MSYS and MSVC. I had imagined that there was just one unresolved external symbol, alloca. But it appears that *all* symbols are unresolved. Looking at the MPIR manual (which I did not write), on page 13 in the section MS Windows DLL's it tells you how to create an Microsoft .lib import library. It seems that MSVC needs this in order to know what symbols are available in the MSYS built mpir.a which you created. Have you done this step? Sorry this is proving difficult, but you are literally the first person who has ever tried to use an MSYS built MPIR library from MSVC, that I know of. The standard way of using MPIR in Windows, and the way which we know how to support, is to build MPIR using the provided Visual Studio Solution files provided by Brian Gladman. But I admit that is difficult to do if you've never done something like that before. Shortly it will be as simple as running a batch script. Since you are so close to getting it to work, I would try making the .lib import library. I can't guarantee that is going to work first go either. You may also need to change the calling conventions option in MSVC (or maybe not, I don't know). Or you can wait a little longer until we issue a new version of MPIR with the new batch scripts and rewrite the documentation. Then things should be much simpler for new users. Another option you might eventually be interested in is Sage for Windows. It uses MPIR, but gives you an easy to use Python language and access to all sorts of maths libraries without you having to do any work. If you only write C/C++ then that isn't really an option for you at this stage. Bill. 2009/6/19 Peter_APIIT <peterap...@gmail.com>: > > int main() > { > /* mpz_class first(123), second(123), result(0); > > result = first + second; > result = result - second; > result = first * second; > result = first / second; > > cout << result.get_d(); > */ > mpz_t a, b, c; > > mpz_init(a); > mpz_init(b); > mpz_init(c); > > mpz_set_str(a, "123", 10); > mpz_set_str(b, "1244", 10); > mpz_set_str(c, "111231234578", 10); > > mpz_add(a, a, b); > gmp_printf("Result is %Zd", a); > > mpz_clear(a); > mpz_clear(b); > mpz_clear(c); > > > return 0; > } > > > error LNK2019: unresolved external symbol _isascii referenced in > function ___gmp_doprnt libmpir.a > > error LNK2019: unresolved external symbol _snprintf referenced in > function ___gmp_doprnt_mpf2 libmpir.a > > fatal error LNK1120: 2 unresolved externals D:\C++\MPIR\Exercise\Debug > \Exercise.exe > > > Actually, i use mpir library as big Num library and to generate prime > number for RSA. What is your opinion ? > > This is too difficult to use. > > Please help. > > Thanks. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---