|Bill Allombert on Sat, 12 May 2007 12:41:30 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: gp2c , pari library and st99|
On Sat, May 12, 2007 at 11:29:46AM +0200, Olivier Ramare wrote: > Dear all, > > I need the compilation option -st99 to be able > to use the linear programming solver lpsolve Try -std=gnu99 > (otherwise, it does not know long long, or so it says :-(). This is a warning not an error, see below. > My understanding of C code is limited, but > the code produced by gp2c does not meet this requirement, > or maybe it is the whole pari library that does not -- > Or maybe I could change the standard in between? Yes, the C standard does not change the ABI, so you do not need to compile everything with the same standard. The issue is that PARI was configured with -std=gnu89. Unfortunately this cause it to not define ulong which is needed when compiled with -std=c89 or -std=c99. This is a serious issue with the headers files but that should not affect you. > gcc -Wall -pedantic BTRSP.c -o BTRSP -lm -llpsolve55 > -I/usr/local/share/lp_solve/ > > In file included from BTRSP.c:10: > /usr/local/share/lp_solve/lp_lib.h:888: warning: ISO C90 does not > support 'long long' > /usr/local/share/lp_solve/lp_lib.h:889: warning: ISO C90 does not > support 'long long' > /usr/local/share/lp_solve/lp_lib.h:1403: warning: ISO C90 does not > support 'long long' This is a warning not an error, generated because you use -pedantic. You can safely ignore it. Cheers, Bill.