This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Mysql.mod

Discussion of Eggdrop's code and module programming in C.
Post Reply
R
RyanH
Voice
Posts: 4
Joined: Tue Dec 06, 2005 7:13 pm
Contact:

Mysql.mod

Post by RyanH »

I have failed attempts with fbsql and mysqltcl, I am closer to getting fbsql to work, I must say, but I'd much rather have this working.

The following is errors from mysql.mod 0.6 compilation using standard gmake (after gmake config of course). MySQL version is quite a bit outdated, being 4.0.xx and TCL is v8.3.

Code: Select all

gcc -pipe -fPIC -g -O2 -Wall -I. -I../../.. -I../../..  -I../../../src/mod -DHAVE_CONFIG_H  -I/usr/local/include/mysql -I/usr/local/include/tcl8.3/generic `mysql_config --cflags` -DMAKING_MODS -c .././mysql.mod/mysql.c
In file included from .././mysql.mod/mysql_mod.h:32,
                 from .././mysql.mod/mysql.c:24:
../../../src/mod/module.h:190:1: warning: "list_delete" redefined
In file included from .././mysql.mod/mysql.c:24:
.././mysql.mod/mysql_mod.h:31:1: warning: this is the location of the previous definition
.././mysql.mod/mysql_mod.h:34:25: mysql/mysql.h: No such file or directory
.././mysql.mod/mysql.c:31: error: syntax error before '*' token
.././mysql.mod/mysql.c:31: warning: type defaults to `int' in declaration of `dbc'
.././mysql.mod/mysql.c:31: warning: data definition has no type or storage class
.././mysql.mod/mysql.c: In function `tcl_mysql_connect':
.././mysql.mod/mysql.c:152: warning: implicit declaration of function `mysql_init'
.././mysql.mod/mysql.c:152: warning: assignment makes pointer from integer without a cast
.././mysql.mod/mysql.c:166: warning: implicit declaration of function `mysql_real_connect'
.././mysql.mod/mysql.c:171: warning: implicit declaration of function `mysql_error'
.././mysql.mod/mysql.c:171: warning: passing arg 2 of `Tcl_AppendToObj' makes pointer from integer without a cast
.././mysql.mod/mysql.c: In function `tcl_mysql_query':
.././mysql.mod/mysql.c:200: error: `MYSQL_RES' undeclared (first use in this function)
.././mysql.mod/mysql.c:200: error: (Each undeclared identifier is reported only once
.././mysql.mod/mysql.c:200: error: for each function it appears in.)
.././mysql.mod/mysql.c:200: error: `result' undeclared (first use in this function)
.././mysql.mod/mysql.c:202: error: syntax error before "row"
.././mysql.mod/mysql.c:209: warning: implicit declaration of function `mysql_query'
.././mysql.mod/mysql.c:212: warning: passing arg 2 of `Tcl_AppendToObj' makes pointer from integer without a cast
.././mysql.mod/mysql.c:218: warning: implicit declaration of function `mysql_store_result'
.././mysql.mod/mysql.c:220: warning: implicit declaration of function `mysql_num_fields'
.././mysql.mod/mysql.c:224: error: `row' undeclared (first use in this function)
.././mysql.mod/mysql.c:224: warning: implicit declaration of function `mysql_fetch_row'
.././mysql.mod/mysql.c:233: warning: implicit declaration of function `mysql_free_result'
.././mysql.mod/mysql.c: In function `tcl_mysql_escape':
.././mysql.mod/mysql.c:267: warning: implicit declaration of function `mysql_real_escape_string'
.././mysql.mod/mysql.c:268: warning: implicit declaration of function `mysql_escape_string'
.././mysql.mod/mysql.c: In function `tcl_mysql_errno':
.././mysql.mod/mysql.c:283: warning: implicit declaration of function `mysql_errno'
.././mysql.mod/mysql.c: In function `tcl_mysql_ping':
.././mysql.mod/mysql.c:295: warning: implicit declaration of function `mysql_ping'
.././mysql.mod/mysql.c: In function `tcl_mysql_insert_id':
.././mysql.mod/mysql.c:332: warning: implicit declaration of function `mysql_insert_id'
.././mysql.mod/mysql.c: In function `tcl_mysql_affected_rows':
.././mysql.mod/mysql.c:354: warning: implicit declaration of function `mysql_affected_rows'
.././mysql.mod/mysql.c: In function `closedb':
.././mysql.mod/mysql.c:362: warning: implicit declaration of function `mysql_close'
*** Error code 1

Stop in /usr/home/Shell/Advanced/runuen/eggdrop1.6.17/src/mod/mysql.mod.
*** Error code 1
Not sure what is going on here, but everything I seem to try with these MySQL modules fail, could it be because of me running such an outdated MySQL? Thanks for reading, and replying if you so choose.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

.././mysql.mod/mysql_mod.h:34:25: mysql/mysql.h: No such file or directory 
that means mySQL client library header wasn't found

check out your mySQL installation, the client lib and header in particular; see Buffy_25's thread in this forum for hints
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

its not the age, you should read the message more carefully:
.././mysql.mod/mysql_mod.h:34:25: mysql/mysql.h: No such file or directory
this is the only fatal error I can see. It basicly tells you it cannot find the mysql header files.

PS: damn, demond dared to be faster a few sec :D
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
R
RyanH
Voice
Posts: 4
Joined: Tue Dec 06, 2005 7:13 pm
Contact:

Post by RyanH »

I actually modified mysql_mod.h in the mysql.mod directory, which had an include to mysql/mysql.h. I changed the include to /usr/local/include/mysql/mysql.h and now all is well. Thanks for your help.
Post Reply