Sunday, June 10, 2007

My first GTK app


bDict is my first GTK app. It is written in C using glade3,Glib and based on the "Anubadok: The Bangla Machine Translator"

http://www.bengalinux.org/cgi-bin/abhidhan/bdict.pl

I just create the GTK GUI for bdict

AIUB 4th OSS Camp on 8th and 9th June 2007


Group Photo

Friday, June 01, 2007

Backup Evolution mails

Yesterday I backup my Evloution mails from my office hdd to home hdd.

Shutdown evolution and gconftool-2:

$evolution --force-shutdown
$gconftool-2 --shutdown

You need to backup this directory.

~/.evolution/
~/.gconf/apps/evolution/
~/.gnome2_private/Evolution

Create a tar.gz
$tar -cvzf evolution-backup.tar.gz .evolution .gconf/apps/evolution .gnome2_private/Evolution


To restore, use:
$gconftool-2 --shutdown
$evolution --force-shutdown
$tar xzf evolution-backup.tar.gz
$gconftool-2 --unload evolution_setting.xml
$gconftool-2 --load evolution_setting.xml
src: http://ubuntu.wordpress.com/

Mysql C API undefined reference to `mysql_init'

Today I was trying to compile simple program written in C to connect mysql

http://www.ucl.ac.uk/is/mysql/c/
http://www.osix.net/modules/article/?id=517

/tmp/ccetdBsn.o: In function `main':
sqltest.c:(.text+0x35): undefined reference to `mysql_init'
sqltest.c:(.text+0x77): undefined reference to `mysql_real_connect'
sqltest.c:(.text+0x86): undefined reference to `mysql_error'
sqltest.c:(.text+0xbf): undefined reference to `mysql_query'
sqltest.c:(.text+0xce): undefined reference to `mysql_error'
sqltest.c:(.text+0xfc): undefined reference to `mysql_use_result'
sqltest.c:(.text+0x130): undefined reference to `mysql_fetch_row'
sqltest.c:(.text+0x144): undefined reference to `mysql_free_result'
sqltest.c:(.text+0x14f): undefined reference to `mysql_close'

I found some people also face this problem.

The problem solved after giving
gcc -o test  -L/usr/lib/mysql -lmysqlclient test.c

src: http://lists.mysql.com/mysql/200178