<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3"><font face="Calibri">Hi</font></font></span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3"><font face="Calibri">I’m having a few problems building the kaleidoscope example (chapter 3) under MinGW. To build the example I use as recommended</font></font></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; BACKGROUND: white" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt"> </span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; BACKGROUND: white" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt">g++ -g -O3 toy.cpp `llvm-config --cppflags --ldflags --libs core` -o toy</span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; BACKGROUND: white" class="MsoNormal"><font size="3" face="Calibri"> </font></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; BACKGROUND: white" class="MsoNormal"><span lang="EN-US"><font size="3"><font face="Calibri">but get the following error<span>  </span></font></font></span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; BACKGROUND: white" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"> </span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; BACKGROUND: white" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US">sh: llvm-config: command not found</span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"> </span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="COLOR: black" lang="EN-US"><font size="3"><font face="Calibri">Indeed in my “\llvm-2.7\tools\llvm-config\” build directory <span> </span>there is no “Release” subdirectory as I would expect (only <span> </span><a href="http://llvm-config.in/" target="_blank">llvm-config.in</a> among other files) and in \llvm-2.7\Release\bin no llvm-config executable (only a llvm-config text file). This was a little unexpected  because otherwise llvm appears to have been built fine and llvm object directory tree also looks OK. </font></font></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="COLOR: black" lang="EN-US"><font size="3" face="Calibri"> </font></span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="COLOR: black" lang="EN-US"><font size="3"><font face="Calibri">What I am doing wrong? Any help would be much appreciated!</font></font></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"> </span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; BACKGROUND: white" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; BACKGROUND: white" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US">***** Error Messages</span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; BACKGROUND: white" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"> </span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; BACKGROUND: white" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US">sh: llvm-config: command not found</span></p>
<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">In file included from /mingw/lib/gcc/mingw32/../../../include/llvm/Type.h:15,</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"><span>                 </span>from /mingw/lib/gcc/mingw32/../../../include/llvm/DerivedTypes.h:21,</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"><span>                 </span>from main.cpp:10:</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font style="BACKGROUND-COLOR: #cccccc"><span style="FONT-FAMILY: 'Courier New'; BACKGROUND: red; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">/mingw/lib/gcc/mingw32/../../../include/llvm/System/DataTypes.h:45:3: error: #error "Must #define __STDC_LIMIT_MACROS before #including System/DataTypes.h"</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></font></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; BACKGROUND: red; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"><font style="BACKGROUND-COLOR: #ffffff"><font style="BACKGROUND-COLOR: #ffffff">/mingw/lib/gcc/mingw32/../../../include</font>/llvm/System/DataTypes.h:49:3: error: #error "Must #define __STDC_CONSTANT_MACROS before " "#including System/DataTypes.h"</font></span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">In file included from /mingw/lib/gcc/mingw32/../../../include/llvm/Attributes.h:18,</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"><span>                 </span>from /mingw/lib/gcc/mingw32/../../../include/llvm/Argument.h:18,</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"><span>                 </span>from /mingw/lib/gcc/mingw32/../../../include/llvm/Function.h:24,</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"><span>                 </span>from /mingw/lib/gcc/mingw32/../../../include/llvm/Module.h:18,</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US"><span> </span><span>                </span>from main.cpp:12:</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font style="BACKGROUND-COLOR: #ffffff"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">/mingw/lib/gcc/mingw32/../../../include/llvm/Support/MathExtras.h: In function 'bool llvm::isInt(int64_t)':</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></font></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font style="BACKGROUND-COLOR: #ffffff"><span style="FONT-FAMILY: 'Courier New'; BACKGROUND: red; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">/mingw/lib/gcc/mingw32/../../../include/llvm/Support/MathExtras.h:57: error: there are no arguments to 'INT64_C' that depend on a template parameter, so a declaration of 'INT64_C' must be available</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></font></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font style="BACKGROUND-COLOR: #ffffff"><span style="FONT-FAMILY: 'Courier New'; BACKGROUND: red; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">/mingw/lib/gcc/mingw32/../../../include/llvm/Support/MathExtras.h:57: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></font></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font style="BACKGROUND-COLOR: #ffffff"><span style="FONT-FAMILY: 'Courier New'; BACKGROUND: red; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">/mingw/lib/gcc/mingw32/../../../include/llvm/Support/MathExtras.h:57: error: there are no arguments to 'INT64_C' that depend on a template parameter, so a declaration of 'INT64_C' must be available</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></font></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font style="BACKGROUND-COLOR: #ffffff"><span style="FONT-FAMILY: 'Courier New'; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">/mingw/lib/gcc/mingw32/../../../include/llvm/Support/MathExtras.h: In function 'bool llvm::isUint(uint64_t)':</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></font></p>

<p style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class="MsoNormal"><font style="BACKGROUND-COLOR: #ffffff"><span style="FONT-FAMILY: 'Courier New'; BACKGROUND: red; COLOR: black; FONT-SIZE: 10pt" lang="EN-US">/mingw/lib/gcc/mingw32/../../../include/llvm/Support/MathExtras.h:62: error: there are no arguments to 'UINT64_C' that depend on a template parameter, so a declaration of 'UINT64_C' must be available</span><span style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"></span></font></p>

<p style="MARGIN: 0cm 0cm 10pt" class="MsoNormal"><span style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt" lang="EN-US"><font style="BACKGROUND-COLOR: #ffffff"> </font></span></p>