Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: cwill34 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 (http://pari.math.u-bordeaux.fr/download.html) 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?
-
It's PARI/GP library's problem, not C::B's.
-
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.
-
Read this: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F