Closed antiochus closed 10 years ago
Ok great! Just one remark. When trying it I got some warnings (with Vala 0.12.1):
Robot.vala:27.1-27.9: warning: method `look' never used Tile look() { ^^^^^^^^^ Robot.vala:40.1-40.8: warning: method `say' never used void say (string s) { outin (@"say $s\n"); } ^^^^^^^^ /tmp/ant-30927-0/Robot.vala.c: In function ‘main’: /tmp/ant-30927-0/Robot.vala.c:271:2: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations] Compilation succeeded - 2 warning(s)
Is there any way to remove them? (The last one seems to be a warning targeted at the Vala developers but not the two first.)
Thank you!
The compiler has a flag "--disable-warnings" aside from that I don't think it's possible to silence indivual warnings:
https://mail.gnome.org/archives/vala-list/2010-July/msg00064.html
Since Vala compiles to C there are always two compilers involved. The "g_type_ini" warning is from gcc and will go away with newer Vala compilers.
Actually I found out that you have to pass --target-glib 2.36
to get rid of the g_type_init
warning. That obviously only works if glib version 2.36 or newer is installed.
Hi,
I don't know if it makes much sense (since the solution code won't differ much from C), but I had time to write a Vala mode for laby.