From: Michael R. <re...@eu...> - 2004-03-08 05:50:23
|
Hi Javi, > I want to develop a pluging to connect to a MySQL server, execute a > query and show on the LCD the number of afected rows. Fine! > That program compiles and runs perfect by itselft on my PC. The only > thing that I should done is just to include that simple program into > a plugin. The plugin will be named plugin_sql.c Please call it "plugin_mysql" > I've followed the README.plugins and I can copile succesfully my > plugin, but when running lcd4linux I can see a "beautifull" Viloacion > de Segmento (which is the spanish term for SEGMENTATION FAULT) > > Here is the code. Hope someone could help me. A very sort description > of the changes I've made on the plugin_sample.c file is included on > the code. It's only a 50 lines' file so it's very easy to read. The code looks quite clean, I can't see any bugs here. But I could not test it, as I don't have MySQL installed anywhere. But I did a test with the plugin_sample.c, this one works fine without segfaulting. How did you test it? Are you shure the segfault is caused by your plugin? (The current CVS code isn't very stable at the moment) I'm always testing plugins with the "interactive" mode (lcd4linux -i). Are you familiar with gdb? gdb is good for locating such segfaults. bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |