Re: [Vala] compile with mysql



Am 16.04.2010 16:29, Jean-Noel Rouchon wrote:
Hello everybody.
I need some help please :

I try to compile a vala program with "using Mysql"

if I compile like this :
valac -o test test.vala --pkg gtk+-2.0 --pkg mysql
I've got an error.

It's work when I do :
valac -o test test.vala --pkg gtk+-2.0 --pkg mysql -C
then
gcc -o test test.c `pkg-config --cflags --libs glib-2.0 --libs gtk+-2.0`
-lmysqlclient

Is there a way to do this directly with valac ?

If your distro doesn't have a '/usr/lib/pkgconfig/mysql.pc' file
you must specify the library with "-X -l...":

valac -o test test.vala --pkg gtk+-2.0 --pkg mysql -X -lmysqlclient


Best regards,

Frederik



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]