User forums > Using Code::Blocks

Vala language

<< < (2/3) > >>

dmoore:

--- Quote from: epsilon_da on April 17, 2009, 04:48:39 pm ---That will produce the final output file, but "compiler" gets executed for each file, which is not valid in this case for vala.

--- End quote ---

Are you sure Vala doesn't support per file compilation? AFAICT you can specify vala output a set .c/.h files for each source. If you tell C::B that these are generated files, C::B will take care of their compilation. This is very much like the swig example in the wiki.


--- Quote --- - The second question, is that if i use valac to generate C code instead of as a compiler, i would need to change the configuration of "GNU GCC Compiler" is there a better project-portable solution?

--- End quote ---

I haven't looked into the portability of the custom compiler setup, but I agree that it's less useful if it can't be easily deployed.

epsilon_da:

--- Quote from: dmoore on April 17, 2009, 08:08:54 pm ---
--- Quote from: epsilon_da on April 17, 2009, 04:48:39 pm ---That will produce the final output file, but "compiler" gets executed for each file, which is not valid in this case for vala.

--- End quote ---
Are you sure Vala doesn't support per file compilation? AFAICT you can specify vala output a set .c/.h files for each source. If you tell C::B that these are generated files, C::B will take care of their compilation. This is very much like the swig example in the wiki.

--- End quote ---

Yes, that could be one solution. I will try it out. But there are 2 BUTs.
Vala acts as a compiler not only a code translator.
A "Vala Project" should be a project only writen in vala code. No C at all.
The translator function should be used in C Projects, like the GTK Project (because Vala uses GLib).
I am trying to make a build script for both cases, i have to fight against the scripting language and an odd documentation.

In a ValaProject case, i may need to setup only a NULL Compiler, that is, build the project entirely with a Build script. Which for Vala is not big deal.
The first Problem is to find documentation about build scripts, because i cant find a good one in the wiki, like other functions to define. The function SetBuildOptions(base) seems to be called before to read the project configuration, because it prints an incorrect value of the output filename.

And for the translation function, i need to be able to add the generated files as "AutoGenerated" from the script. What function can do that?

epsilon_da:

--- Quote from: dmoore on April 17, 2009, 08:08:54 pm ---
--- Quote from: epsilon_da on April 17, 2009, 04:48:39 pm ---That will produce the final output file, but "compiler" gets executed for each file, which is not valid in this case for vala.

--- End quote ---

Are you sure Vala doesn't support per file compilation? AFAICT you can specify vala output a set .c/.h files for each source. If you tell C::B that these are generated files, C::B will take care of their compilation. This is very much like the swig example in the wiki.

--- End quote ---

That wont work either.
If main.vala depends on mylib.vala, then the command line needs both references.
valac -C main.vala mylib.vala -H .....
If not, it will not find the symbol references.

simonsunnyboy:
Hello all,

has there been any further efforts for real Vala integration into Code::Blocks? E.q. installing a full project and syntax highlighting?

Thank you!
Matthias

stahta01:

--- Quote from: simonsunnyboy on February 23, 2011, 06:27:26 pm ---Hello all,

has there been any further efforts for real Vala integration into Code::Blocks? E.q. installing a full project and syntax highlighting?

Thank you!
Matthias

--- End quote ---

For syntax highlighting you need to write an lexer for scintilla or wait for someone else to do it.
Then tell the Code::Blocks team about it; and then they can try to add it to Code::Blocks.

Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version