Author Topic: Linking PARI library  (Read 4644 times)

Offline cwill34

  • Single posting newcomer
  • *
  • Posts: 2
Linking PARI library
« on: November 15, 2010, 09:46:30 am »
I've spent way too much time trying to figure this out (hence it being 3:40 AM).

I've got the PARI/GP library that I want to use for arbitrary precision calculations. I downloaded the tar.gz from their website, I got cygwin, I ran ./Configure and then make install. Library made. Woo.

I went to Settings -> Compiler and Debugger, and added the \include folder PARI generated, so the headers are all found. I clicked on the linker tab in the same window, and added the directory to the libpari.a library file. Under my project specifically, I linked libpari.a directly via the Linker Settings tab. This is how I read this is all to be done, and everything is recognized.

Yet, I keep getting odd errors, not just for PARI/GP, but for any other library I try to link this way. When I add in #include <pari.h> so I can use the library, I get 4 errors:

C:\cygwin\usr\local\include\pari\paridecl.h|525|error: expected ')' before numeric constant|
C:\cygwin\usr\local\include\pari\paridecl.h|632|error: expected ')' before numeric constant|
C:\cygwin\usr\local\include\pari\paridecl.h|632|error: expected ';', ',' or ')' before 'GEN'|
C:\cygwin\usr\local\include\pari\paridecl.h|644|error: expected ')' before numeric constant|

This header file is one of the many pari.h uses, and I really cant understand whats going on. When I tried a different arbitrary precision library, I got other similar errors. The libraries are built correctly, they are not corrupt as I tried this multiple times with different dowloads of the same library. It has to be something i'm doing wrong within C::B.

Help?
« Last Edit: November 15, 2010, 09:49:44 am by dank »

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: Linking PARI library
« Reply #1 on: November 15, 2010, 10:20:22 am »
It's PARI/GP library's problem, not C::B's.
Regards,
xunxun

Offline cwill34

  • Single posting newcomer
  • *
  • Posts: 2
Re: Linking PARI library
« Reply #2 on: November 15, 2010, 10:29:14 am »
I'm positive that there's nothing wrong with the library, rather how I am trying to link it. I guess i'm asking for the proper way of linking a library, and using it. I'm doing something wrong.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]