Justin C. Walker on Wed, 11 Apr 2007 20:02:20 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: How to use PARI library on windows?


This is pretty far off-topic for this list. For the basics of program development, you should refer to the documentation/help files for the system you are using, or get help on a mailing list more appropriate to beginner programming.

On Apr 11, 2007, at 03:55 , mindelix@takas.lt wrote:

Hi, I want to use PARI library, writing my own programs. I'm using Windows XP OS and I write and compile my programs with C++ Builder 6. Is there anybody who could help me? Could anyone give me instructions how to build and compile such a code:

#include <pari/pari.h>

main() {
GEN x, y;
pari_init(1000000, 2);

x = stoi(10);
y = stoi(11);
output( addii(x, y) );
}

I can't help with Windows specifically, but on a Unix system, you would create a file, say "foo.c", containing your program, and then compile it:

    cc -o foo foo.c -lpari

If "C++ Builder" is an IDE[*], you will have to tell it, however that's done, to use libpari; that is what the "-lpari" does in the command-line version above.

That's all there is to it.

Justin

[*] Integrated Development Environment

--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
Men are from Earth.
Women are from Earth.
   Deal with it.
--------