Mike told me I should put this up here, so here it is :)
DigitalDJ failed to compile for my computer due to
newer MySQL libraries (4.0+) and GCC 3.1 differences.
1. mysql_connect() is depreciated in favor of
mysql_real_connect(), which is basically
mysql_connect() with a mysql_select_db() thrown in. In
MySQL 4's libraries, mysql_connect() no longer exists
(afaik mysql_real_connect() has been around in at least
3.22/3.23 for a long time - this switch shouldn't break
compatibility with older database servers).
2. I was confused by "args=va_start(args,fmt)", since
va_start() returns void. So was GCC. This happened in
two places in ddj, modified it to read va_start(args,fmt).
3. There were a bunch of GCC's new warnings about
multi-line strings. I dunno if it's really that polite
to change those (I'm new to patches) but I did a few
Shift-J's in vim and the warnings are gone. Of course,
the source looks a little uglier too :).
4. mysql_create_db() has been depreciated in favor of
mysql_query("CREATE DATABASE `db_name`")
I've put all these in, and made nifty error messages
using mysql_errno() and mysql_error().
Log in to post a comment.