[Vala] running Soup example

2010-01-13 Thread Denis Kuzmenok
Hi, i'm new to vala, trying examples now, i've tried this example: http://live.gnome.org/Vala/LibSoupSample but recieve this error: r...@centos-54-64-minimal ~/develop/vala # valac --pkg libsoup-2.4 --thread server.vala r...@centos-54-64-minimal ~/develop/vala # ./server ./server: error while

Re: [Vala] running Soup example

2010-01-13 Thread Cem Eliguzel
Please try this: LD_DEBUG=libs server and look at the output. Cem Eliguzel On 01/13/2010 12:30 AM, Denis Kuzmenok wrote: Hi, i'm new to vala, trying examples now, i've tried this example: http://live.gnome.org/Vala/LibSoupSample but recieve this error: r...@centos-54-64-minimal

Re: [Vala] running Soup example

2010-01-13 Thread Cem Eliguzel
Please try this: LD_DEBUG=libs server and look at the output. Cem Eliguzel On 01/13/2010 12:30 AM, Denis Kuzmenok wrote: Hi, i'm new to vala, trying examples now, i've tried this example: http://live.gnome.org/Vala/LibSoupSample but recieve this error: r...@centos-54-64-minimal

Re: [Vala] running Soup example

2010-01-13 Thread Denis Kuzmenok
Got it to work with: PKG_CONFIG_PATH, somehow libsoup/glib2 lies in /usr/lib, and system on lib64, but now it's ok, seems to me. Thanks, anyway ;) Please try this: LD_DEBUG=libs server and look at the output. Cem Eliguzel On 01/13/2010 12:30 AM, Denis Kuzmenok wrote: Hi, i'm new to

[Vala] Mysql binding

2010-01-13 Thread Denis Kuzmenok
Hi, i'm trying mysql bindings now, and it doesn't work for me, r...@centos-54-64-minimal ~/develop/vala # valac --pkg mysql mysql2.vala ./mysql2 mysql2.vala:10.19-10.33: error: `Mysql.Database' does not have a default constructor Database mysql = new Database ();

[Vala] Threads and closures problem

2010-01-13 Thread JM
Hi all I just played around with closures as thread functions. I'm not sure if this example is supposed to work, but at least it compiles. class HHH : Object { public void run() { string test = test; try { Thread.create( ()= {

Re: [Vala] Threads and closures problem

2010-01-13 Thread Łukasz Pankowski
JM interfl...@gmx.net writes: Hi all I just played around with closures as thread functions. I'm not sure if this example is supposed to work, but at least it compiles. class HHH : Object { public void run() { string test = test; try {

Re: [Vala] Threads and closures problem

2010-01-13 Thread JM
Hi Łukas Thanks for your reply! This somehow does not work as soon as I add another thread. class HHH : Object { private ThreadFunc f; public void run() { string test = test; try { f = ()= { print(in thread : %s \n, test);

Re: [Vala] Threads and async (was: Threads and closures problem)

2010-01-13 Thread Jiří Zárevúcky
Michael 'Mickey' Lauer píše v Čt 14. 01. 2010 v 00:48 +0100: Jörn's mail about threads and closures reminded me about a problem I wanted to highlight here. The addition of async functions in Vala is a very great feature, however I wonder how this could work with multiple threads? As far as I

Re: [Vala] Threads and closures problem

2010-01-13 Thread JM
The problem gets worse, as soon as I use a class variable: class HHH : Object { private ThreadFunc f; public int t; public void run() { t = 4; string test = test; try { f = ()= { Thread.usleep(1000);

Re: [Vala] Threads and closures problem

2010-01-13 Thread JM
If I do the same thing with an Idle, the behavior is significantly different, as the block data is not destroyed as soon as the run() function is left. Why is that? Well working example: class HHH : Object { public void run() { string test = test;

Re: [Vala] Threads and async (was: Threads and closures problem)

2010-01-13 Thread Michael 'Mickey' Lauer
Ok, I just tried the following program: = void* thread_func_1() { var loop = new MainLoop(); async_func_1(); loop.run(); return null; } void* thread_func_2() { var loop = new MainLoop();

Re: [Vala] Threads and async (was: Threads and closures problem)

2010-01-13 Thread Michael 'Mickey' Lauer
Looks like I spoke too soon. The attached program emits a wrong output: ** Message: thread.vala:43: main thread 14350 ** Message: thread.vala:31: thread 14352 ** Message: thread.vala:21: thread 14351 ** Message: thread.vala:31: thread 14352 ** Message: thread.vala:21: thread 14352 ** Message:

[Vala] Is the C code generated by valac compliant with C89, or C99?

2010-01-13 Thread Jerry Tan
Hi, all, I know that I can use gcc or sunstudio to compile C code which is generated by valac, I just want to know that is there any compiler dependency, for example, gcc extension, c99 support, any requirement for gcc version or sunstudio version?