On Sun, 2008-04-20 at 00:36 +0200, Alexander Prinsier wrote: > Hello, > > I'm trying to access a mysql database in a plugin. > > -What special compiler flags do I need? I discovered that when I don't > explicitly link lib-sql/libsql.a in, then I get an undefind symbol error > about sql_init when loading the plugin.
Right. Also you need the mysql libraries linked with it. > Shouldn't the imap process itself have sql support linked in, rather > than each plugin? It could, but since IMAP normally doesn't need SQL it would just be extra bloat and slower startup time for >99% of users. That's one of the main reasons why dict-proxy exists, so that SQL support can be linked only to dict process and used by IMAP plugins via the proxy. I think it would be possible to create a SQL plugin though, which contains lib-sql.a and the sql libraries linked to it as well. Although that would require changes to lib-sql also so that it would build a .la library out of it.
signature.asc
Description: This is a digitally signed message part
