Vala is a new multiplatform compiler similar to C# based on GObject.
It is quickly growing and is being adopted by many GNOME projects.
It can also generate Code in C using GLib objects.
http://live.gnome.org/ValaSadly i cant find a way to setup it as a Compiler, because it is not a classical C compiler.
It can do many tasks:
- Generate C/GLib Code, for libraries, clases, or the entire app, and be completely usable from C.
- Compile the entire Vala project.
- Compile directly without linking.
- Handle dependencies when posible.
If i set as a C and C++ compiler "valac" then i get the next message:
"Linking stage skipped (build target has no object files to link)
Nothing to be done."
I think that CB is not calling the compiler properly.
To compile an entire Vala Project execute the next command:
valac -o output main.vala file1.vala file2.vala ... -pkg dependency1-1.0 dependency2-1.0 ...
And this will compile the entire project. So there is not much to do more than having 3 variables:
$output_name
$vala_file_list
$vala_dependency_list
then
valac -o $output_name $vala_file_list -pkg $vala_dependency_list
But i dont know how to automate this process in codeblocks.
In a GTK project could also be useful to convert a class implemented in Vala in a .c/.h pair to be used from the C project.
valac -C myclass.vala --directory ./myclass/ -H ./myclass/myclass.h
This can be done in "Pre build steps" but the result files, should be compiled by codeblocks, and so, added to the project before compiling, but should not be directly edited because will be overwriten by valac.
There are a few IDEs being developed for Vala. But any of them are close to CodeBlocks.
CB could make an step forward in the next version and easily add the Vala compiler and projects.