Bill Allombert on Sun, 25 Feb 2007 16:27:49 +0100


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

Re: libpari and static linking


On Wed, Feb 21, 2007 at 05:03:15PM +0100, Jeroen Demeyer wrote:
> Hello list,
> 
> I wrote a C++ program which uses libPARI for factoring integers (the 
> function Z_factor()).  However, it only compiles with dynamic linking. 
> When I link -static, I get the following errors:
> 
> factor.o: In function `factornumber(number_t const&)':
> factor.cpp:(.text+0x10c): undefined reference to `avma'
> factor.cpp:(.text+0x1d9): undefined reference to `Z_factor'
> collect2: ld returned 1 exit status
> 
> This was compiled with g++ (GCC) 3.4.6
> 
> Maybe a certain trick is needed to make static linking work?  It could 
> be a C vs. C++ problem, but with dynamic linking, it works perfectly.

Most likely libpari.a is not installed: you need to run
"make install-lib-sta", simply doing  "make install" does not install
it.

Cheers,
Bill.