[plt-scheme] connecting DrScheme servlets to MySQL
I'm using DrScheme v299.100. I want to connect with a MySQL database.
I had some adventures with mysqlclient.ss below. Then I thought,
"Maybe I should be using SchemeQL and/or SrPersist?" SrPersist is
available for the early 2.0x PLT Schemes. Can/should I use it? Where
should I be going? Thanks.
Geoffrey
--
Geoffrey S. Knauth | http://knauth.org/gsk
-----------------------------------
I'm new to mzc. I downloaded mysqlclient.ss from:
http://www.cs.uvm.edu/~dvanhorn/scheme/
I put the files c-syntax-transformer.ss c-syntax.ss mysqlclient.ss in:
~/lib/plt/mysql/
I wrote a little foo.sh:
-----8<-----
#!/bin/bash
MZC=/Applications/Added_Apps/PLT_Scheme_v299.100/bin/mzc
LIB=/usr/local/mysql/lib/libmysqlclient.a
INC=/usr/local/mysql/include/
WHAT=mysqlclient.ss
$MZC --auto-dir ++ldf $LIB ++ccf -I$INC $WHAT
-----8<-----
which produces the errors below. What am I doing wrong?
$ sh foo.sh
MzScheme compiler (mzc) version 299.100, Copyright (c) 2005 PLT Scheme,
Inc.
"mysqlclient.ss":
[?,?]: Error: C compiler did not complete successfully
compile-extension:
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_2':
/tmp/mzcTMPmysqlclient.c:90: warning: assignment discards qualifiers
from pointer target type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_6':
/tmp/mzcTMPmysqlclient.c:174: warning: passing arg 1 of
`mysql_dump_debug_info' from incompatible pointer type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_8':
/tmp/mzcTMPmysqlclient.c:216: warning: assignment discards qualifiers
from pointer target type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_11':
/tmp/mzcTMPmysqlclient.c:279: warning: assignment from incompatible
pointer type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_13':
/tmp/mzcTMPmysqlclient.c:328: warning: passing arg 2 of
`mysql_field_seek' makes integer from pointer without a cast
/tmp/mzcTMPmysqlclient.c:328: warning: assignment makes pointer from
integer without a cast
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_14':
/tmp/mzcTMPmysqlclient.c:349: warning: assignment makes pointer from
integer without a cast
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_16':
/tmp/mzcTMPmysqlclient.c:381: warning: assignment discards qualifiers
from pointer target type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_17':
/tmp/mzcTMPmysqlclient.c:402: warning: assignment discards qualifiers
from pointer target type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_18':
/tmp/mzcTMPmysqlclient.c:423: warning: assignment makes integer from
pointer without a cast
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_19':
/tmp/mzcTMPmysqlclient.c:444: warning: assignment discards qualifiers
from pointer target type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_20':
/tmp/mzcTMPmysqlclient.c:465: warning: assignment discards qualifiers
from pointer target type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_30':
/tmp/mzcTMPmysqlclient.c:721: warning: passing arg 3 of `mysql_options'
from incompatible pointer type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_48':
/tmp/mzcTMPmysqlclient.c:1184: warning: passing arg 2 of
`mysql_row_seek' from incompatible pointer type
/tmp/mzcTMPmysqlclient.c:1184: warning: assignment from incompatible
pointer type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_49':
/tmp/mzcTMPmysqlclient.c:1205: warning: assignment from incompatible
pointer type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_51':
/tmp/mzcTMPmysqlclient.c:1254: error: too few arguments to function
`mysql_shutdown'
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_52':
/tmp/mzcTMPmysqlclient.c:1275: warning: assignment discards qualifiers
from pointer target type
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_90':
/tmp/mzcTMPmysqlclient.c:1912: warning: assignment makes integer from
pointer without a cast
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_91':
/tmp/mzcTMPmysqlclient.c:1933: warning: assignment makes integer from
pointer without a cast
/tmp/mzcTMPmysqlclient.c: In function `mzc_cffi_92':
/tmp/mzcTMPmysqlclient.c:1963: warning: assignment from incompatible
pointer typeErrors encountered. Compilation aborted.