Nothing to say there. To develop something with UI, fast recompilation is very important. In tests, the tcc gives me approximately 2x increase. But unfortunately I can’t compile an application using GTK.
> vala hello.vala --cc tcc
Hello, World
> vala gtkExample.vala --pkg gtk+-3.0 --cc tcc
tcc: error: undefined symbol 'main'
error: cc exited with status 256
>
I don’t get an error with valac 0.42.5 together with tcc 0.9.27.
However, couldn’t it be that vala gets confused by you using Gtk which
defines main itself? I don’t think it should, but I could understand
it’s confused by not knowing what to select between main() and
Gtk.main(). My version definitely doesn’t get confused, but maybe
another one, I don’t know.
I hope someone with arch will respond in this thread to make sure that this is my problem(after all, applications without GTK are compiled??? maybe it’s a regression)
You could try and see what kind of C code gets generated; but, in general, I think you should open a bug against Vala whenever the generated C code does not compile valid Vala code.
/* console.c generated by valac 0.44.6, the Vala compiler
* generated from console.vala, do not modify */
#include <glib.h>
void _vala_main (void);
void
_vala_main (void)
{
g_print ("Hello, World\n");
}
int
main (int argc,
char ** argv)
{
_vala_main ();
return 0;
}
If you thought that I cant compile applications with gtk then it is not. They arent compiled only when using tcc. And there is obviously one main. Now I will try to do it on a virtual machine with Ubuntu 19.04.
[gavr@gavr-pc ~]$ vala console.vala
hello
[gavr@gavr-pc ~]$ vala console.vala -cc tcc --pkg gtk+-3.0
tcc: error: undefined symbol 'main'
error: cc exited with status 256
[gavr@gavr-pc ~]$ valac --version
Vala 0.44.3
[gavr@gavr-pc ~]$ uname -r
4.19.42-1-MANJARO
As you can see Vala versions are the same. On both VMs, tcc has just been installed, so it is extremely unlikely that the problem is in its installation. It looks like this is something specific to the arch-based distribution, although this is only a guess.
I don’t know in which project issue should be created, it would be nice if someone more knowledgeable tried to do the same as me.