Custom compiler
From Code::Blocks
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
TODO Text about what custom compiler does.
Bison Example
For example enable Custom Compiler to generate a cpp file form a bison grammatic.
Given a bison file "myparser.ypp" in your source tree. Select properties, go to advanced tab, tick custom compiler and add the line "bison $file".
- Note if you use the supplied mingw binaries, you have to define BISON_SIMPLE=%CB%\share\bison.simple, BISON_HAIRY=%CB%\share\bison.hairy as environment variables. Otherwise you could install http://gnuwin32.sourceforge.net/packages/bison.htm (Setup, without binaries has all required DLLs) and just add the "bin" directory to your System's PATH environment variable.
Compiler Parameters
- $compiler
- $linker
- $lib_linker
- $rescomp
- $options
- $link_options
- $includes
- $res_includes
- $libdirs
- $libs
- $file - current file being compiled
- $dep_object
- $object
- $resource_output
- $exe_output
- $exe_output
- $link_resobjects
- $link_objects
- $link_flat_objects
- $static_output
- $def_output
- MACROS - also all macros are applied to the commandline string
The following were added to support the QUICK HACK in compiler plugin: DirectCommands::GetTargetLinkCommands()
- $+link_objects
- $-link_objects
- $-+link_objects
- $+-link_objects
Implementation Details can be found here: http://svn.berlios.de/svnroot/repos/codeblocks/trunk/src/sdk/compilercommandgenerator.cpp