MySQLmodule.c install problems

Andrew Csillag drew.csillag at starmedia.net
Wed Mar 22 11:43:28 EST 2000


Thomas wrote:
> 
> Hi everyone,
> 
> I've scavenged everywhere to solve this problem, but cannot get Python
> and MySQL to be friends again.
> 
> I've placed the MySQLmodule.c in the ../Modules folder and I modified the
> Setup file to add the following:
> 
> #*shared*
> MySQL MySQLmodule.c -L/usr/local/lib/mysql/ \
>  -lmysqlclient -I/usr/local/include/mysql
> 
> fianlly, at the top of the directory, I run:
> 
> >make clobber  # clean out my previous installation
> >./configure -with--threads   # need this for Zope
> >make
> 
> at this point, Python starts to make itself, but dies everytime spitting out:
> 
> gcc -fpic  -I/usr/local/include/mysql -g -O2 -I./../Include -I..
> -DHAVE_CONFIG_H
>  -c ./MySQLmodule.c
> ./MySQLmodule.c: In function `pythonify_row':
> ./MySQLmodule.c:238: warning: assignment from incompatible pointer type
> ./MySQLmodule.c: In function `pythonify_res_fields':
> ./MySQLmodule.c:384: invalid lvalue in unary `&'
> ./MySQLmodule.c: In function `STH_fetchdict':
> ./MySQLmodule.c:1125: invalid lvalue in unary `&'
> ./MySQLmodule.c:1147: invalid lvalue in unary `&'
> *** Error code 1
> 
> Stop.
> *** Error code 1
> 
> Stop.
> 
> I've looked everywhere and talked to a few people, and no answers yet.
> Does anyone
> know what's wrong with the above?
> 

If you remove the offending &'s on the lines where it reports the error,
all should work fine.
-- 
print(lambda(q,p):'pmt:$%0.2f'%(q*p/(p-1)))((lambda(a,r,n),t:(a*r/
t,pow(1+r/t,n*12)))(map(input,('amt:','%rate:','years:')),1200.0))




More information about the Python-list mailing list