3

I've got all the source code for PARI, but i'm not sure how to use it/generate the pari library. Up to now, i've had to add a couple header files for things such as complex numbers using #include <complex.h>, so I figure it is the same idea for using PARI.

I add pari.h's path in my compiler and #include <pari.h> works, but creates a massive list of other errors including mostly "expected ')' before numeric constant" inside of paricfg.h.

I'm definitely doing it wrong. I know there's some semi-automated way to create a library file to import in using linux commands, but i'm using windows, and i'm not sure I can run the necessary files via cmd.

How can i utilize PARI?

Jay
  • 9,585
  • 6
  • 49
  • 72
Chris
  • 67
  • 3
  • 1
    See also [SO 4180571](http://stackoverflow.com/questions/4180571/compiling-with-a-multi-precision-math-library-in-c-using-codeblocks-on-windows) by the same poster. – Jonathan Leffler Nov 15 '10 at 02:24

1 Answers1

0

Did you build the library before trying to use it? If you didn't, take a look at the INSTALL file or one of the README files.

To be able to build this type of library on Windows you'll need either MinGW or Cygwin. Although after a quick look at the README.WIN file, MinGW seems to be out of the question. You might also want to consider installing a Linux distro in a VM and using that to build and run your application.

Ze Blob
  • 2,817
  • 22
  • 16
  • i'm not sure how to build it in windows without the linux commands install tells you to use – Chris Nov 14 '10 at 00:44
  • Sounds like the OP is describing a compile error, not a linking error. (It could well be that he hasn't installed the library, but that's not his immediate issue.) – chrisaycock Nov 14 '10 at 00:45
  • True, but I've had a look at the install package and the header that's causing problems doesn't look like something you're supposed to include in your code. Probably something that's used for the build. – Ze Blob Nov 14 '10 at 01:47