<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AndrewCot</id>
	<title>Code::Blocks - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AndrewCot"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/AndrewCot"/>
	<updated>2026-05-02T13:35:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiler_file&amp;diff=9573</id>
		<title>Compiler file</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiler_file&amp;diff=9573"/>
		<updated>2022-02-23T10:41:31Z</updated>

		<summary type="html">&lt;p&gt;AndrewCot: Add note that you need &amp;quot;&amp;lt;Search envVar=&amp;quot; in order for masterpath to work.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
Format for defining compiler interfaces using only XML (in conjunction with [[Compiler options file]]s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_compiler name=&amp;quot;Digital Mars Compiler&amp;quot;&lt;br /&gt;
                     id=&amp;quot;dmc&amp;quot;&lt;br /&gt;
                     weight=&amp;quot;24&amp;quot;&lt;br /&gt;
                     platform=&amp;quot;windows&amp;quot;&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/CodeBlocks_compiler&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
I am a Code::Blocks compiler file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;name=&amp;quot;&amp;lt;/tt&amp;gt;&amp;lt;txt&amp;gt;&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;txt&amp;gt; is the descriptive name that will be shown to the user for this compiler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;id=&amp;quot;&amp;lt;/tt&amp;gt;&amp;lt;id&amp;gt;&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Lowercase sequence of letters, numbers, underscores, and/or hyphens (it must, however, start with a letter) which is used internally to represent this compiler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;weight=&amp;quot;&amp;lt;/tt&amp;gt;&amp;lt;num&amp;gt;&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt; (optional)&lt;br /&gt;
* Determines the order in the compiler drop-down menu that this compiler will be listed; lower numbers are listed sooner (keep &amp;lt;num&amp;gt; between 0 and 100).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;platform=&amp;quot;&amp;lt;/tt&amp;gt;&amp;lt;os&amp;gt;&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt; (optional). Only load this compiler if the current operating system is &amp;lt;os&amp;gt;. &amp;lt;os&amp;gt; is one of:&lt;br /&gt;
* &amp;lt;tt&amp;gt;windows&lt;br /&gt;
* macosx&lt;br /&gt;
* linux&lt;br /&gt;
* freebsd&lt;br /&gt;
* netbsd&lt;br /&gt;
* openbsd&lt;br /&gt;
* darwin&lt;br /&gt;
* solaris&lt;br /&gt;
* unix&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All of the following routines are used during auto-detection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conditional &amp;lt;tt&amp;gt;&amp;lt;if&amp;gt;[...]&amp;lt;/if&amp;gt;&amp;lt;else&amp;gt;[...]&amp;lt;/else&amp;gt;&amp;lt;/tt&amp;gt; statements are available in the same form as in [[Compiler options file]]s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Path type=&amp;quot;master&amp;quot;&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/Path&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;type=&amp;quot;&amp;lt;/tt&amp;gt;&amp;lt;tp&amp;gt;&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt; Determines what variable the results of the contained detection routine(s) will be stored in. &amp;lt;tp&amp;gt; is one of:&lt;br /&gt;
* &amp;lt;tt&amp;gt;master&lt;br /&gt;
* extra&lt;br /&gt;
* include&lt;br /&gt;
* resource&lt;br /&gt;
* lib&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Search envVar=&amp;quot;PATH&amp;quot;&lt;br /&gt;
        for=&amp;quot;C&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Searches all paths in the given environment variable.&lt;br /&gt;
* If &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; is not specified, any path that exists will be added to the current &amp;lt;tt&amp;gt;&amp;lt;Path type=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* If &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; is given, the corresponding executable name will be replaced (if applicable; see &amp;lt;tt&amp;gt;&amp;lt;if exec=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/if&amp;gt;&amp;lt;/tt&amp;gt; blocks). If the specified file exists on any of the paths in the environment variable, those path(s) will be added.&lt;br /&gt;
If you do not have a &amp;lt;Search envVar= then the compiler auto detection code will not set the masterpath and cause compiler issues.&lt;br /&gt;
&lt;br /&gt;
(If the current path type is &amp;lt;tt&amp;gt;master&amp;lt;/tt&amp;gt;, any trailing &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt; directories will be stripped.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Search path=&amp;quot;C:\MinGW&amp;quot;&lt;br /&gt;
        for=&amp;quot;C&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Same functionality as &amp;lt;tt&amp;gt;&amp;lt;Search envVar=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt; except that this tests a hard-coded path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Search path=&amp;quot;C:\WinAVR*&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Wildcards are allowed in &amp;lt;tt&amp;gt;&amp;lt;Search path=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Search registry=&amp;quot;HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC&amp;quot;&lt;br /&gt;
        value=&amp;quot;InstallLocation&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Read a Windows registry key. If &amp;lt;tt&amp;gt;value&amp;lt;/tt&amp;gt; is found in the registry key, and it is a valid folder, it will be added to the current &amp;lt;tt&amp;gt;&amp;lt;Path type=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Fallback path=&amp;quot;/usr/local&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the current &amp;lt;tt&amp;gt;&amp;lt;Path type=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt; is empty, add this path to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Add&amp;gt;&amp;lt;master/&amp;gt;&amp;lt;separator/&amp;gt;lib&amp;lt;/Add&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add a path to the current &amp;lt;tt&amp;gt;&amp;lt;Path type=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;master/&amp;gt;&amp;lt;/tt&amp;gt; is replaced by the contents of the master path.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;separator/&amp;gt;&amp;lt;/tt&amp;gt; is replaced by the system's native file path separator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Add cFlag=&amp;quot;-O&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enable a compiler flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Add lFlag=&amp;quot;-s&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enable a linker flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Add lib=&amp;quot;pthread&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add a library.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Compiler options file]]&lt;br /&gt;
* [/index.php/topic,16463.0.html XML based compilers]&lt;/div&gt;</summary>
		<author><name>AndrewCot</name></author>
	</entry>
</feed>